amazonka-license-manager-2.0: Amazon License Manager 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.LicenseManager.CreateToken

Description

Creates a long-lived token.

A refresh token is a JWT token used to get an access token. With an access token, you can call AssumeRoleWithWebIdentity to get role credentials that you can use to call License Manager to manage the specified license.

Synopsis

Creating a Request

data CreateToken Source #

See: newCreateToken smart constructor.

Constructors

CreateToken' 

Fields

  • expirationInDays :: Maybe Int

    Token expiration, in days, counted from token creation. The default is 365 days.

  • roleArns :: Maybe [Text]

    Amazon Resource Name (ARN) of the IAM roles to embed in the token. License Manager does not check whether the roles are in use.

  • tokenProperties :: Maybe [Text]

    Data specified by the caller to be included in the JWT token. The data is mapped to the amr claim of the JWT token.

  • licenseArn :: Text

    Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim of the JWT token.

  • clientToken :: Text

    Idempotency token, valid for 10 minutes.

Instances

Instances details
ToJSON CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

ToHeaders CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Methods

toHeaders :: CreateToken -> [Header] #

ToPath CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

ToQuery CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

AWSRequest CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type AWSResponse CreateToken #

Generic CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type Rep CreateToken :: Type -> Type #

Read CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Show CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

NFData CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Methods

rnf :: CreateToken -> () #

Eq CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Hashable CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type AWSResponse CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateToken = D1 ('MetaData "CreateToken" "Amazonka.LicenseManager.CreateToken" "amazonka-license-manager-2.0-7MwrI8iJ3YaDRGRrldCApy" 'False) (C1 ('MetaCons "CreateToken'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "expirationInDays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "roleArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "tokenProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "licenseArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))

newCreateToken Source #

Create a value of CreateToken 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:expirationInDays:CreateToken', createToken_expirationInDays - Token expiration, in days, counted from token creation. The default is 365 days.

CreateToken, createToken_roleArns - Amazon Resource Name (ARN) of the IAM roles to embed in the token. License Manager does not check whether the roles are in use.

CreateToken, createToken_tokenProperties - Data specified by the caller to be included in the JWT token. The data is mapped to the amr claim of the JWT token.

CreateToken, createToken_licenseArn - Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim of the JWT token.

$sel:clientToken:CreateToken', createToken_clientToken - Idempotency token, valid for 10 minutes.

Request Lenses

createToken_expirationInDays :: Lens' CreateToken (Maybe Int) Source #

Token expiration, in days, counted from token creation. The default is 365 days.

createToken_roleArns :: Lens' CreateToken (Maybe [Text]) Source #

Amazon Resource Name (ARN) of the IAM roles to embed in the token. License Manager does not check whether the roles are in use.

createToken_tokenProperties :: Lens' CreateToken (Maybe [Text]) Source #

Data specified by the caller to be included in the JWT token. The data is mapped to the amr claim of the JWT token.

createToken_licenseArn :: Lens' CreateToken Text Source #

Amazon Resource Name (ARN) of the license. The ARN is mapped to the aud claim of the JWT token.

createToken_clientToken :: Lens' CreateToken Text Source #

Idempotency token, valid for 10 minutes.

Destructuring the Response

data CreateTokenResponse Source #

See: newCreateTokenResponse smart constructor.

Constructors

CreateTokenResponse' 

Fields

Instances

Instances details
Generic CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type Rep CreateTokenResponse :: Type -> Type #

Read CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Show CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

NFData CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Methods

rnf :: CreateTokenResponse -> () #

Eq CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateTokenResponse = D1 ('MetaData "CreateTokenResponse" "Amazonka.LicenseManager.CreateToken" "amazonka-license-manager-2.0-7MwrI8iJ3YaDRGRrldCApy" 'False) (C1 ('MetaCons "CreateTokenResponse'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "token") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "tokenId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "tokenType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe TokenType)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))))

newCreateTokenResponse Source #

Create a value of CreateTokenResponse 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:token:CreateTokenResponse', createTokenResponse_token - Refresh token, encoded as a JWT token.

CreateTokenResponse, createTokenResponse_tokenId - Token ID.

CreateTokenResponse, createTokenResponse_tokenType - Token type.

$sel:httpStatus:CreateTokenResponse', createTokenResponse_httpStatus - The response's http status code.

Response Lenses

createTokenResponse_token :: Lens' CreateTokenResponse (Maybe Text) Source #

Refresh token, encoded as a JWT token.