amazonka-grafana-2.0: Amazon Managed Grafana SDK.
Copyright(c) 2013-2023 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellSafe-Inferred
LanguageHaskell2010

Amazonka.Grafana.CreateWorkspaceApiKey

Description

Creates a Grafana API key for the workspace. This key can be used to authenticate requests sent to the workspace's HTTP API. See https://docs.aws.amazon.com/grafana/latest/userguide/Using-Grafana-APIs.html for available APIs and example requests.

Synopsis

Creating a Request

data CreateWorkspaceApiKey Source #

See: newCreateWorkspaceApiKey smart constructor.

Constructors

CreateWorkspaceApiKey' 

Fields

  • keyName :: Text

    Specifies the name of the key. Keynames must be unique to the workspace.

  • keyRole :: Text

    Specifies the permission level of the key.

    Valid values: VIEWER|EDITOR|ADMIN

  • secondsToLive :: Natural

    Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.

  • workspaceId :: Text

    The ID of the workspace to create an API key.

Instances

Instances details
ToJSON CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

ToHeaders CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

ToPath CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

ToQuery CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

AWSRequest CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Associated Types

type AWSResponse CreateWorkspaceApiKey #

Generic CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Associated Types

type Rep CreateWorkspaceApiKey :: Type -> Type #

Read CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Show CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

NFData CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Methods

rnf :: CreateWorkspaceApiKey -> () #

Eq CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Hashable CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

type AWSResponse CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

type Rep CreateWorkspaceApiKey Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

type Rep CreateWorkspaceApiKey = D1 ('MetaData "CreateWorkspaceApiKey" "Amazonka.Grafana.CreateWorkspaceApiKey" "amazonka-grafana-2.0-1hXXW2cgZWZJGJ3AoD5xOB" 'False) (C1 ('MetaCons "CreateWorkspaceApiKey'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "keyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "keyRole") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)) :*: (S1 ('MetaSel ('Just "secondsToLive") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Natural) :*: S1 ('MetaSel ('Just "workspaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newCreateWorkspaceApiKey Source #

Create a value of CreateWorkspaceApiKey with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

CreateWorkspaceApiKey, createWorkspaceApiKey_keyName - Specifies the name of the key. Keynames must be unique to the workspace.

$sel:keyRole:CreateWorkspaceApiKey', createWorkspaceApiKey_keyRole - Specifies the permission level of the key.

Valid values: VIEWER|EDITOR|ADMIN

$sel:secondsToLive:CreateWorkspaceApiKey', createWorkspaceApiKey_secondsToLive - Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.

CreateWorkspaceApiKey, createWorkspaceApiKey_workspaceId - The ID of the workspace to create an API key.

Request Lenses

createWorkspaceApiKey_keyName :: Lens' CreateWorkspaceApiKey Text Source #

Specifies the name of the key. Keynames must be unique to the workspace.

createWorkspaceApiKey_keyRole :: Lens' CreateWorkspaceApiKey Text Source #

Specifies the permission level of the key.

Valid values: VIEWER|EDITOR|ADMIN

createWorkspaceApiKey_secondsToLive :: Lens' CreateWorkspaceApiKey Natural Source #

Specifies the time in seconds until the key expires. Keys can be valid for up to 30 days.

createWorkspaceApiKey_workspaceId :: Lens' CreateWorkspaceApiKey Text Source #

The ID of the workspace to create an API key.

Destructuring the Response

data CreateWorkspaceApiKeyResponse Source #

See: newCreateWorkspaceApiKeyResponse smart constructor.

Constructors

CreateWorkspaceApiKeyResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • key :: Sensitive Text

    The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace.

  • keyName :: Text

    The name of the key that was created.

  • workspaceId :: Text

    The ID of the workspace that the key is valid for.

Instances

Instances details
Generic CreateWorkspaceApiKeyResponse Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Associated Types

type Rep CreateWorkspaceApiKeyResponse :: Type -> Type #

Show CreateWorkspaceApiKeyResponse Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

NFData CreateWorkspaceApiKeyResponse Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

Eq CreateWorkspaceApiKeyResponse Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

type Rep CreateWorkspaceApiKeyResponse Source # 
Instance details

Defined in Amazonka.Grafana.CreateWorkspaceApiKey

type Rep CreateWorkspaceApiKeyResponse = D1 ('MetaData "CreateWorkspaceApiKeyResponse" "Amazonka.Grafana.CreateWorkspaceApiKey" "amazonka-grafana-2.0-1hXXW2cgZWZJGJ3AoD5xOB" 'False) (C1 ('MetaCons "CreateWorkspaceApiKeyResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "key") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Sensitive Text))) :*: (S1 ('MetaSel ('Just "keyName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "workspaceId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))

newCreateWorkspaceApiKeyResponse Source #

Create a value of CreateWorkspaceApiKeyResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:CreateWorkspaceApiKeyResponse', createWorkspaceApiKeyResponse_httpStatus - The response's http status code.

$sel:key:CreateWorkspaceApiKeyResponse', createWorkspaceApiKeyResponse_key - The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace.

CreateWorkspaceApiKey, createWorkspaceApiKeyResponse_keyName - The name of the key that was created.

CreateWorkspaceApiKey, createWorkspaceApiKeyResponse_workspaceId - The ID of the workspace that the key is valid for.

Response Lenses

createWorkspaceApiKeyResponse_key :: Lens' CreateWorkspaceApiKeyResponse Text Source #

The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace.

createWorkspaceApiKeyResponse_workspaceId :: Lens' CreateWorkspaceApiKeyResponse Text Source #

The ID of the workspace that the key is valid for.