Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultMetadataServiceVersion = "2021-09-30" DefaultServerEndpoint = "http://169.254.169.254" // headers MetadataFlavor = "Metadata-Flavor" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { VPCAuthEndpoint string InstanceIdentiyTokenEndpoint string IAMTokenEndpoint string Version string }
func DefaultConfig ¶
type IAMAccessTokenRequest ¶
type IAMAccessTokenRequest struct { AccessToken string `json:"access_token"` Body *TrustedProfileByIdOrCRN }
IAMAccessTokenRequest represents the request object for the `GetIAMAccessToken` operation. AccessToken - The instance identity token Body - The trusted profile ID/CRN represented as the `TrustedProfileByIdOrCRN` object
func NewIAMAccessTokenRequest ¶
func NewIAMAccessTokenRequest(profileID string, profileCRN string, token string) (*IAMAccessTokenRequest, error)
NewIAMAccessTokenRequest builds the request body for the GetIAMAccessToken operation. The request body for this operation consists of either a trusted profile ID or CRN. If both a trusted profile ID and a trusted profile CRN are provided, then an error is returned.
type InstanceIdentityToken ¶
type InstanceIdentityToken struct { // The access token AccessToken string `json:"access_token"` // The date and time that the access token was created CreatedAt string `json:"created_at"` // The date and time that the access token will expire ExpiresAt string `json:"expires_at"` // Time in seconds before the access token expires ExpiresIn int `json:"expires_in"` }
InstanceIdentityToken describes the response body for the 'GetInstanceIdentityToken' operation.
type Interface ¶
type Interface interface { GetInstanceIdentityToken() (*InstanceIdentityToken, error) GetIAMAccessToken(req *IAMAccessTokenRequest) (*iam.Token, error) }
type TrustedProfileByIdOrCRN ¶
Click to show internal directories.
Click to hide internal directories.