Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSIdentity ¶ added in v1.1.7
AWSIdentity represents the identity of an AWS account.
**Attributes:**
Account: AWS account ID. ARN: AWS ARN associated with the account. UserID: AWS user ID associated with the account.
type AWSService ¶ added in v1.1.7
type AWSService struct { STSClient STSClientAPI IAMClient IdentityClientAPI }
AWSService represents the AWS services needed for the application.
**Attributes:**
STSClient: Client to make calls to the AWS STS service. IAMClient: Client to make calls to the AWS IAM service.
func NewAWSService ¶ added in v1.1.7
func NewAWSService() (*AWSService, error)
NewAWSService creates a new AWSService with the default AWS configuration.
**Returns:**
*AWSService: A pointer to the newly created AWSService. error: An error if any issue occurs while trying to create the AWSService.
func (*AWSService) GetAWSIdentity ¶ added in v1.1.7
func (s *AWSService) GetAWSIdentity() (*AWSIdentity, error)
GetAWSIdentity retrieves the AWS identity of the caller.
**Returns:**
*AWSIdentity: A pointer to the AWSIdentity of the caller. error: An error if any issue occurs while trying to get the AWS identity.
func (*AWSService) GetInstanceProfile ¶ added in v1.1.7
func (s *AWSService) GetInstanceProfile(profileName string) (*types.InstanceProfile, error)
GetInstanceProfile retrieves the instance profile for a given profile name.
**Parameters:**
profileName: The name of the profile to retrieve.
**Returns:**
*types.InstanceProfile: A pointer to the InstanceProfile. error: An error if any issue occurs while trying to get the instance profile.
type IdentityClientAPI ¶ added in v1.1.7
type IdentityClientAPI interface {
GetInstanceProfile(ctx context.Context, params *iam.GetInstanceProfileInput, optFns ...func(*iam.Options)) (*iam.GetInstanceProfileOutput, error)
}
IdentityClientAPI represents the interface needed to make calls to the AWS IAM service.
**Attributes:**
GetInstanceProfile: Function to get the instance profile.
type STSClientAPI ¶ added in v1.1.7
type STSClientAPI interface {
GetCallerIdentity(ctx context.Context, params *sts.GetCallerIdentityInput, optFns ...func(*sts.Options)) (*sts.GetCallerIdentityOutput, error)
}
STSClientAPI represents the interface needed to make calls to the AWS STS service.
**Attributes:**
GetCallerIdentity: Function to get the caller identity.