libZSservicesZSamazonka-license-managerZSamazonka-license-manager
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

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

  • 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.

  • 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.

  • expirationInDays :: Maybe Int

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

  • 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
Eq CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Read CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Show CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Generic CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type Rep CreateToken :: Type -> Type #

NFData CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Methods

rnf :: CreateToken -> () #

Hashable CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

ToJSON CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

AWSRequest CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type AWSResponse 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

type Rep CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateToken = D1 ('MetaData "CreateToken" "Amazonka.LicenseManager.CreateToken" "libZSservicesZSamazonka-license-managerZSamazonka-license-manager" 'False) (C1 ('MetaCons "CreateToken'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "tokenProperties") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "roleArns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))) :*: (S1 ('MetaSel ('Just "expirationInDays") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "licenseArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "clientToken") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))))
type AWSResponse CreateToken Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

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:tokenProperties: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.

$sel:roleArns: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.

$sel:expirationInDays:CreateToken', createToken_expirationInDays - Token expiration, in days, counted from token creation. The default is 365 days.

$sel:licenseArn: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_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_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_expirationInDays :: Lens' CreateToken (Maybe Int) Source #

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

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
Eq CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Read CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Show CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Generic CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Associated Types

type Rep CreateTokenResponse :: Type -> Type #

NFData CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

Methods

rnf :: CreateTokenResponse -> () #

type Rep CreateTokenResponse Source # 
Instance details

Defined in Amazonka.LicenseManager.CreateToken

type Rep CreateTokenResponse = D1 ('MetaData "CreateTokenResponse" "Amazonka.LicenseManager.CreateToken" "libZSservicesZSamazonka-license-managerZSamazonka-license-manager" '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.

$sel:tokenId:CreateTokenResponse', createTokenResponse_tokenId - Token ID.

$sel:tokenType: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.