diff --git a/CHANGELOG.md b/CHANGELOG.md index 317b08af684..7bb4dc6de86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Release v1.44.68 (2022-08-02) +=== + +### Service Client Updates +* `service/license-manager-user-subscriptions`: Adds new service +* `service/personalize`: Updates service API and documentation + Release v1.44.67 (2022-08-01) === diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index a8a0ab73bf3..2716911c9be 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -13445,6 +13445,133 @@ var awsPartition = partition{ }, }, }, + "license-manager-user-subscriptions": service{ + Endpoints: serviceEndpoints{ + endpointKey{ + Region: "af-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-east-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-2", + }: endpoint{}, + endpointKey{ + Region: "ap-northeast-3", + }: endpoint{}, + endpointKey{ + Region: "ap-south-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-1", + }: endpoint{}, + endpointKey{ + Region: "ap-southeast-2", + }: endpoint{}, + endpointKey{ + Region: "ca-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-central-1", + }: endpoint{}, + endpointKey{ + Region: "eu-north-1", + }: endpoint{}, + endpointKey{ + Region: "eu-south-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-1", + }: endpoint{}, + endpointKey{ + Region: "eu-west-2", + }: endpoint{}, + endpointKey{ + Region: "eu-west-3", + }: endpoint{}, + endpointKey{ + Region: "fips-us-east-1", + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-east-2", + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-1", + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "fips-us-west-2", + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + Deprecated: boxedTrue, + }, + endpointKey{ + Region: "me-south-1", + }: endpoint{}, + endpointKey{ + Region: "sa-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + }: endpoint{}, + endpointKey{ + Region: "us-east-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com", + }, + endpointKey{ + Region: "us-east-2", + }: endpoint{}, + endpointKey{ + Region: "us-east-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com", + }, + endpointKey{ + Region: "us-west-1", + }: endpoint{}, + endpointKey{ + Region: "us-west-1", + Variant: fipsVariant, + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com", + }, + endpointKey{ + Region: "us-west-2", + }: endpoint{}, + endpointKey{ + Region: "us-west-2", + Variant: fipsVariant, + }: endpoint{ + Hostname: "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com", + }, + }, + }, "lightsail": service{ Endpoints: serviceEndpoints{ endpointKey{ diff --git a/aws/version.go b/aws/version.go index d75329b0ba2..3aa245a52af 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.44.67" +const SDKVersion = "1.44.68" diff --git a/models/apis/license-manager-user-subscriptions/2018-05-10/api-2.json b/models/apis/license-manager-user-subscriptions/2018-05-10/api-2.json new file mode 100644 index 00000000000..cede87ffbd6 --- /dev/null +++ b/models/apis/license-manager-user-subscriptions/2018-05-10/api-2.json @@ -0,0 +1,576 @@ +{ + "version":"2.0", + "metadata":{ + "apiVersion":"2018-05-10", + "endpointPrefix":"license-manager-user-subscriptions", + "jsonVersion":"1.1", + "protocol":"rest-json", + "serviceFullName":"AWS License Manager User Subscriptions", + "serviceId":"License Manager User Subscriptions", + "signatureVersion":"v4", + "signingName":"license-manager-user-subscriptions", + "uid":"license-manager-user-subscriptions-2018-05-10" + }, + "operations":{ + "AssociateUser":{ + "name":"AssociateUser", + "http":{ + "method":"POST", + "requestUri":"/user/AssociateUser", + "responseCode":200 + }, + "input":{"shape":"AssociateUserRequest"}, + "output":{"shape":"AssociateUserResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ], + "idempotent":true + }, + "DeregisterIdentityProvider":{ + "name":"DeregisterIdentityProvider", + "http":{ + "method":"POST", + "requestUri":"/identity-provider/DeregisterIdentityProvider", + "responseCode":200 + }, + "input":{"shape":"DeregisterIdentityProviderRequest"}, + "output":{"shape":"DeregisterIdentityProviderResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ], + "idempotent":true + }, + "DisassociateUser":{ + "name":"DisassociateUser", + "http":{ + "method":"POST", + "requestUri":"/user/DisassociateUser", + "responseCode":200 + }, + "input":{"shape":"DisassociateUserRequest"}, + "output":{"shape":"DisassociateUserResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ], + "idempotent":true + }, + "ListIdentityProviders":{ + "name":"ListIdentityProviders", + "http":{ + "method":"POST", + "requestUri":"/identity-provider/ListIdentityProviders", + "responseCode":200 + }, + "input":{"shape":"ListIdentityProvidersRequest"}, + "output":{"shape":"ListIdentityProvidersResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + }, + "ListInstances":{ + "name":"ListInstances", + "http":{ + "method":"POST", + "requestUri":"/instance/ListInstances", + "responseCode":200 + }, + "input":{"shape":"ListInstancesRequest"}, + "output":{"shape":"ListInstancesResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + }, + "ListProductSubscriptions":{ + "name":"ListProductSubscriptions", + "http":{ + "method":"POST", + "requestUri":"/user/ListProductSubscriptions", + "responseCode":200 + }, + "input":{"shape":"ListProductSubscriptionsRequest"}, + "output":{"shape":"ListProductSubscriptionsResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + }, + "ListUserAssociations":{ + "name":"ListUserAssociations", + "http":{ + "method":"POST", + "requestUri":"/user/ListUserAssociations", + "responseCode":200 + }, + "input":{"shape":"ListUserAssociationsRequest"}, + "output":{"shape":"ListUserAssociationsResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + }, + "RegisterIdentityProvider":{ + "name":"RegisterIdentityProvider", + "http":{ + "method":"POST", + "requestUri":"/identity-provider/RegisterIdentityProvider", + "responseCode":200 + }, + "input":{"shape":"RegisterIdentityProviderRequest"}, + "output":{"shape":"RegisterIdentityProviderResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ], + "idempotent":true + }, + "StartProductSubscription":{ + "name":"StartProductSubscription", + "http":{ + "method":"POST", + "requestUri":"/user/StartProductSubscription", + "responseCode":200 + }, + "input":{"shape":"StartProductSubscriptionRequest"}, + "output":{"shape":"StartProductSubscriptionResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + }, + "StopProductSubscription":{ + "name":"StopProductSubscription", + "http":{ + "method":"POST", + "requestUri":"/user/StopProductSubscription", + "responseCode":200 + }, + "input":{"shape":"StopProductSubscriptionRequest"}, + "output":{"shape":"StopProductSubscriptionResponse"}, + "errors":[ + {"shape":"ServiceQuotaExceededException"}, + {"shape":"ConflictException"}, + {"shape":"ValidationException"}, + {"shape":"ThrottlingException"}, + {"shape":"InternalServerException"}, + {"shape":"ResourceNotFoundException"}, + {"shape":"AccessDeniedException"} + ] + } + }, + "shapes":{ + "AccessDeniedException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true + }, + "ActiveDirectoryIdentityProvider":{ + "type":"structure", + "members":{ + "DirectoryId":{"shape":"String"} + } + }, + "AssociateUserRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "InstanceId", + "Username" + ], + "members":{ + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "InstanceId":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "AssociateUserResponse":{ + "type":"structure", + "required":["InstanceUserSummary"], + "members":{ + "InstanceUserSummary":{"shape":"InstanceUserSummary"} + } + }, + "BoxInteger":{ + "type":"integer", + "box":true + }, + "ConflictException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true, + "fault":true + }, + "DeregisterIdentityProviderRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product" + ], + "members":{ + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"} + } + }, + "DeregisterIdentityProviderResponse":{ + "type":"structure", + "required":["IdentityProviderSummary"], + "members":{ + "IdentityProviderSummary":{"shape":"IdentityProviderSummary"} + } + }, + "DisassociateUserRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "InstanceId", + "Username" + ], + "members":{ + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "InstanceId":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "DisassociateUserResponse":{ + "type":"structure", + "required":["InstanceUserSummary"], + "members":{ + "InstanceUserSummary":{"shape":"InstanceUserSummary"} + } + }, + "Filter":{ + "type":"structure", + "members":{ + "Attribute":{"shape":"String"}, + "Operation":{"shape":"String"}, + "Value":{"shape":"String"} + } + }, + "FilterList":{ + "type":"list", + "member":{"shape":"Filter"} + }, + "IdentityProvider":{ + "type":"structure", + "members":{ + "ActiveDirectoryIdentityProvider":{"shape":"ActiveDirectoryIdentityProvider"} + }, + "union":true + }, + "IdentityProviderSummary":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product", + "Status" + ], + "members":{ + "FailureMessage":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"}, + "Status":{"shape":"String"} + } + }, + "IdentityProviderSummaryList":{ + "type":"list", + "member":{"shape":"IdentityProviderSummary"} + }, + "InstanceSummary":{ + "type":"structure", + "required":[ + "InstanceId", + "Products", + "Status" + ], + "members":{ + "InstanceId":{"shape":"String"}, + "LastStatusCheckDate":{"shape":"String"}, + "Products":{"shape":"StringList"}, + "Status":{"shape":"String"}, + "StatusMessage":{"shape":"String"} + } + }, + "InstanceSummaryList":{ + "type":"list", + "member":{"shape":"InstanceSummary"} + }, + "InstanceUserSummary":{ + "type":"structure", + "required":[ + "IdentityProvider", + "InstanceId", + "Status", + "Username" + ], + "members":{ + "AssociationDate":{"shape":"String"}, + "DisassociationDate":{"shape":"String"}, + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "InstanceId":{"shape":"String"}, + "Status":{"shape":"String"}, + "StatusMessage":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "InstanceUserSummaryList":{ + "type":"list", + "member":{"shape":"InstanceUserSummary"} + }, + "InternalServerException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true, + "fault":true + }, + "ListIdentityProvidersRequest":{ + "type":"structure", + "members":{ + "MaxResults":{"shape":"BoxInteger"}, + "NextToken":{"shape":"String"} + } + }, + "ListIdentityProvidersResponse":{ + "type":"structure", + "required":["IdentityProviderSummaries"], + "members":{ + "IdentityProviderSummaries":{"shape":"IdentityProviderSummaryList"}, + "NextToken":{"shape":"String"} + } + }, + "ListInstancesRequest":{ + "type":"structure", + "members":{ + "Filters":{"shape":"FilterList"}, + "MaxResults":{"shape":"BoxInteger"}, + "NextToken":{"shape":"String"} + } + }, + "ListInstancesResponse":{ + "type":"structure", + "members":{ + "InstanceSummaries":{"shape":"InstanceSummaryList"}, + "NextToken":{"shape":"String"} + } + }, + "ListProductSubscriptionsRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product" + ], + "members":{ + "Filters":{"shape":"FilterList"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "MaxResults":{"shape":"BoxInteger"}, + "NextToken":{"shape":"String"}, + "Product":{"shape":"String"} + } + }, + "ListProductSubscriptionsResponse":{ + "type":"structure", + "members":{ + "NextToken":{"shape":"String"}, + "ProductUserSummaries":{"shape":"ProductUserSummaryList"} + } + }, + "ListUserAssociationsRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "InstanceId" + ], + "members":{ + "Filters":{"shape":"FilterList"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "InstanceId":{"shape":"String"}, + "MaxResults":{"shape":"BoxInteger"}, + "NextToken":{"shape":"String"} + } + }, + "ListUserAssociationsResponse":{ + "type":"structure", + "members":{ + "InstanceUserSummaries":{"shape":"InstanceUserSummaryList"}, + "NextToken":{"shape":"String"} + } + }, + "ProductUserSummary":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product", + "Status", + "Username" + ], + "members":{ + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"}, + "Status":{"shape":"String"}, + "StatusMessage":{"shape":"String"}, + "SubscriptionEndDate":{"shape":"String"}, + "SubscriptionStartDate":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "ProductUserSummaryList":{ + "type":"list", + "member":{"shape":"ProductUserSummary"} + }, + "RegisterIdentityProviderRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product" + ], + "members":{ + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"} + } + }, + "RegisterIdentityProviderResponse":{ + "type":"structure", + "required":["IdentityProviderSummary"], + "members":{ + "IdentityProviderSummary":{"shape":"IdentityProviderSummary"} + } + }, + "ResourceNotFoundException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "error":{ + "httpStatusCode":404, + "senderFault":true + }, + "exception":true + }, + "ServiceQuotaExceededException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true + }, + "StartProductSubscriptionRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product", + "Username" + ], + "members":{ + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "StartProductSubscriptionResponse":{ + "type":"structure", + "required":["ProductUserSummary"], + "members":{ + "ProductUserSummary":{"shape":"ProductUserSummary"} + } + }, + "StopProductSubscriptionRequest":{ + "type":"structure", + "required":[ + "IdentityProvider", + "Product", + "Username" + ], + "members":{ + "Domain":{"shape":"String"}, + "IdentityProvider":{"shape":"IdentityProvider"}, + "Product":{"shape":"String"}, + "Username":{"shape":"String"} + } + }, + "StopProductSubscriptionResponse":{ + "type":"structure", + "required":["ProductUserSummary"], + "members":{ + "ProductUserSummary":{"shape":"ProductUserSummary"} + } + }, + "String":{"type":"string"}, + "StringList":{ + "type":"list", + "member":{"shape":"String"} + }, + "ThrottlingException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true + }, + "ValidationException":{ + "type":"structure", + "members":{ + "message":{"shape":"String"} + }, + "exception":true + } + } +} diff --git a/models/apis/license-manager-user-subscriptions/2018-05-10/docs-2.json b/models/apis/license-manager-user-subscriptions/2018-05-10/docs-2.json new file mode 100644 index 00000000000..45c72c00d18 --- /dev/null +++ b/models/apis/license-manager-user-subscriptions/2018-05-10/docs-2.json @@ -0,0 +1,320 @@ +{ + "version": "2.0", + "service": "

With License Manager, you can create user-based subscriptions to utilize licensed software with a per user subscription fee on Amazon EC2 instances.

", + "operations": { + "AssociateUser": "

Associates the user to an EC2 instance to utilize user-based subscriptions.

", + "DeregisterIdentityProvider": "

Deregisters the identity provider from providing user-based subscriptions.

", + "DisassociateUser": "

Disassociates the user from an EC2 instance providing user-based subscriptions.

", + "ListIdentityProviders": "

Lists the identity providers for user-based subscriptions.

", + "ListInstances": "

Lists the EC2 instances providing user-based subscriptions.

", + "ListProductSubscriptions": "

Lists the user-based subscription products available from an identity provider.

", + "ListUserAssociations": "

Lists user associations for an identity provider.

", + "RegisterIdentityProvider": "

Registers an identity provider for user-based subscriptions.

", + "StartProductSubscription": "

Starts a product subscription for a user with the specified identity provider.

", + "StopProductSubscription": "

Stops a product subscription for a user with the specified identity provider.

" + }, + "shapes": { + "AccessDeniedException": { + "base": "

You don't have sufficient access to perform this action.

", + "refs": { + } + }, + "ActiveDirectoryIdentityProvider": { + "base": "

Details about an Active Directory identity provider.

", + "refs": { + "IdentityProvider$ActiveDirectoryIdentityProvider": "

An object that details an Active Directory identity provider.

" + } + }, + "AssociateUserRequest": { + "base": null, + "refs": { + } + }, + "AssociateUserResponse": { + "base": null, + "refs": { + } + }, + "BoxInteger": { + "base": null, + "refs": { + "ListIdentityProvidersRequest$MaxResults": "

Maximum number of results to return in a single call.

", + "ListInstancesRequest$MaxResults": "

Maximum number of results to return in a single call.

", + "ListProductSubscriptionsRequest$MaxResults": "

Maximum number of results to return in a single call.

", + "ListUserAssociationsRequest$MaxResults": "

Maximum number of results to return in a single call.

" + } + }, + "ConflictException": { + "base": "

The request couldn't be completed because it conflicted with the current state of the resource.

", + "refs": { + } + }, + "DeregisterIdentityProviderRequest": { + "base": null, + "refs": { + } + }, + "DeregisterIdentityProviderResponse": { + "base": null, + "refs": { + } + }, + "DisassociateUserRequest": { + "base": null, + "refs": { + } + }, + "DisassociateUserResponse": { + "base": null, + "refs": { + } + }, + "Filter": { + "base": "

A filter name and value pair that is used to return more specific results from a describe operation. Filters can be used to match a set of resources by specific criteria, such as tags, attributes, or IDs.

", + "refs": { + "FilterList$member": null + } + }, + "FilterList": { + "base": null, + "refs": { + "ListInstancesRequest$Filters": "

An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

", + "ListProductSubscriptionsRequest$Filters": "

An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

", + "ListUserAssociationsRequest$Filters": "

An array of structures that you can use to filter the results to those that match one or more sets of key-value pairs that you specify.

" + } + }, + "IdentityProvider": { + "base": "

Details about an identity provider.

", + "refs": { + "AssociateUserRequest$IdentityProvider": "

The identity provider of the user.

", + "DeregisterIdentityProviderRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "DisassociateUserRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "IdentityProviderSummary$IdentityProvider": "

An object that specifies details for the identity provider.

", + "InstanceUserSummary$IdentityProvider": "

An object that specifies details for the identity provider.

", + "ListProductSubscriptionsRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "ListUserAssociationsRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "ProductUserSummary$IdentityProvider": "

An object that specifies details for the identity provider.

", + "RegisterIdentityProviderRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "StartProductSubscriptionRequest$IdentityProvider": "

An object that specifies details for the identity provider.

", + "StopProductSubscriptionRequest$IdentityProvider": "

An object that specifies details for the identity provider.

" + } + }, + "IdentityProviderSummary": { + "base": "

Describes an identity provider.

", + "refs": { + "DeregisterIdentityProviderResponse$IdentityProviderSummary": "

Metadata that describes the results of an identity provider operation.

", + "IdentityProviderSummaryList$member": null, + "RegisterIdentityProviderResponse$IdentityProviderSummary": "

Metadata that describes the results of an identity provider operation.

" + } + }, + "IdentityProviderSummaryList": { + "base": null, + "refs": { + "ListIdentityProvidersResponse$IdentityProviderSummaries": "

Metadata that describes the list identity providers operation.

" + } + }, + "InstanceSummary": { + "base": "

Describes an EC2 instance providing user-based subscriptions.

", + "refs": { + "InstanceSummaryList$member": null + } + }, + "InstanceSummaryList": { + "base": null, + "refs": { + "ListInstancesResponse$InstanceSummaries": "

Metadata that describes the list instances operation.

" + } + }, + "InstanceUserSummary": { + "base": "

Describes users of an EC2 instance providing user-based subscriptions.

", + "refs": { + "AssociateUserResponse$InstanceUserSummary": "

Metadata that describes the associate user operation.

", + "DisassociateUserResponse$InstanceUserSummary": "

Metadata that describes the associate user operation.

", + "InstanceUserSummaryList$member": null + } + }, + "InstanceUserSummaryList": { + "base": null, + "refs": { + "ListUserAssociationsResponse$InstanceUserSummaries": "

Metadata that describes the list user association operation.

" + } + }, + "InternalServerException": { + "base": "

An exception occurred with the service.

", + "refs": { + } + }, + "ListIdentityProvidersRequest": { + "base": null, + "refs": { + } + }, + "ListIdentityProvidersResponse": { + "base": null, + "refs": { + } + }, + "ListInstancesRequest": { + "base": null, + "refs": { + } + }, + "ListInstancesResponse": { + "base": null, + "refs": { + } + }, + "ListProductSubscriptionsRequest": { + "base": null, + "refs": { + } + }, + "ListProductSubscriptionsResponse": { + "base": null, + "refs": { + } + }, + "ListUserAssociationsRequest": { + "base": null, + "refs": { + } + }, + "ListUserAssociationsResponse": { + "base": null, + "refs": { + } + }, + "ProductUserSummary": { + "base": "

The summary of the user-based subscription products for a user.

", + "refs": { + "ProductUserSummaryList$member": null, + "StartProductSubscriptionResponse$ProductUserSummary": "

Metadata that describes the start product subscription operation.

", + "StopProductSubscriptionResponse$ProductUserSummary": "

Metadata that describes the start product subscription operation.

" + } + }, + "ProductUserSummaryList": { + "base": null, + "refs": { + "ListProductSubscriptionsResponse$ProductUserSummaries": "

Metadata that describes the list product subscriptions operation.

" + } + }, + "RegisterIdentityProviderRequest": { + "base": null, + "refs": { + } + }, + "RegisterIdentityProviderResponse": { + "base": null, + "refs": { + } + }, + "ResourceNotFoundException": { + "base": "

The resource couldn't be found.

", + "refs": { + } + }, + "ServiceQuotaExceededException": { + "base": "

The request failed because a service quota is exceeded.

", + "refs": { + } + }, + "StartProductSubscriptionRequest": { + "base": null, + "refs": { + } + }, + "StartProductSubscriptionResponse": { + "base": null, + "refs": { + } + }, + "StopProductSubscriptionRequest": { + "base": null, + "refs": { + } + }, + "StopProductSubscriptionResponse": { + "base": null, + "refs": { + } + }, + "String": { + "base": null, + "refs": { + "AccessDeniedException$message": null, + "ActiveDirectoryIdentityProvider$DirectoryId": "

The directory ID for an Active Directory identity provider.

", + "AssociateUserRequest$Domain": "

The domain name of the user.

", + "AssociateUserRequest$InstanceId": "

The ID of the EC2 instance, which provides user-based subscriptions.

", + "AssociateUserRequest$Username": "

The user name from the identity provider for the user.

", + "ConflictException$message": null, + "DeregisterIdentityProviderRequest$Product": "

The name of the user-based subscription product.

", + "DisassociateUserRequest$Domain": "

The domain name of the user.

", + "DisassociateUserRequest$InstanceId": "

The ID of the EC2 instance, which provides user-based subscriptions.

", + "DisassociateUserRequest$Username": "

The user name from the identity provider for the user.

", + "Filter$Attribute": "

The name of an attribute to use as a filter.

", + "Filter$Operation": "

The type of search (For example, eq, geq, leq)

", + "Filter$Value": "

Value of the filter.

", + "IdentityProviderSummary$FailureMessage": "

The failure message associated with an identity provider.

", + "IdentityProviderSummary$Product": "

The name of the user-based subscription product.

", + "IdentityProviderSummary$Status": "

The status of an identity provider.

", + "InstanceSummary$InstanceId": "

The ID of the EC2 instance, which provides user-based subscriptions.

", + "InstanceSummary$LastStatusCheckDate": "

The date of the last status check.

", + "InstanceSummary$Status": "

The status of an EC2 instance resource.

", + "InstanceSummary$StatusMessage": "

The status message for an EC2 instance.

", + "InstanceUserSummary$AssociationDate": "

The date a user was associated with an EC2 instance.

", + "InstanceUserSummary$DisassociationDate": "

The date a user was disassociated from an EC2 instance.

", + "InstanceUserSummary$Domain": "

The domain name of the user.

", + "InstanceUserSummary$InstanceId": "

The ID of the EC2 instance, which provides user-based subscriptions.

", + "InstanceUserSummary$Status": "

The status of a user associated with an EC2 instance.

", + "InstanceUserSummary$StatusMessage": "

The status message for users of an EC2 instance.

", + "InstanceUserSummary$Username": "

The user name from the identity provider for the user.

", + "InternalServerException$message": null, + "ListIdentityProvidersRequest$NextToken": "

Token for the next set of results.

", + "ListIdentityProvidersResponse$NextToken": "

Token for the next set of results.

", + "ListInstancesRequest$NextToken": "

Token for the next set of results.

", + "ListInstancesResponse$NextToken": "

Token for the next set of results.

", + "ListProductSubscriptionsRequest$NextToken": "

Token for the next set of results.

", + "ListProductSubscriptionsRequest$Product": "

The name of the user-based subscription product.

", + "ListProductSubscriptionsResponse$NextToken": "

Token for the next set of results.

", + "ListUserAssociationsRequest$InstanceId": "

The ID of the EC2 instance, which provides user-based subscriptions.

", + "ListUserAssociationsRequest$NextToken": "

Token for the next set of results.

", + "ListUserAssociationsResponse$NextToken": "

Token for the next set of results.

", + "ProductUserSummary$Domain": "

The domain name of the user.

", + "ProductUserSummary$Product": "

The name of the user-based subscription product.

", + "ProductUserSummary$Status": "

The status of a product for a user.

", + "ProductUserSummary$StatusMessage": "

The status message for a product for a user.

", + "ProductUserSummary$SubscriptionEndDate": "

The end date of a subscription.

", + "ProductUserSummary$SubscriptionStartDate": "

The start date of a subscription.

", + "ProductUserSummary$Username": "

The user name from the identity provider of the user.

", + "RegisterIdentityProviderRequest$Product": "

The name of the user-based subscription product.

", + "ResourceNotFoundException$message": null, + "ServiceQuotaExceededException$message": null, + "StartProductSubscriptionRequest$Domain": "

The domain name of the user.

", + "StartProductSubscriptionRequest$Product": "

The name of the user-based subscription product.

", + "StartProductSubscriptionRequest$Username": "

The user name from the identity provider of the user.

", + "StopProductSubscriptionRequest$Domain": "

The domain name of the user.

", + "StopProductSubscriptionRequest$Product": "

The name of the user-based subscription product.

", + "StopProductSubscriptionRequest$Username": "

The user name from the identity provider for the user.

", + "StringList$member": null, + "ThrottlingException$message": null, + "ValidationException$message": null + } + }, + "StringList": { + "base": null, + "refs": { + "InstanceSummary$Products": "

A list of provided user-based subscription products.

" + } + }, + "ThrottlingException": { + "base": "

The request was denied because of request throttling. Retry the request.

", + "refs": { + } + }, + "ValidationException": { + "base": "

A parameter is not valid.

", + "refs": { + } + } + } +} diff --git a/models/apis/license-manager-user-subscriptions/2018-05-10/examples-1.json b/models/apis/license-manager-user-subscriptions/2018-05-10/examples-1.json new file mode 100644 index 00000000000..0ea7e3b0bbe --- /dev/null +++ b/models/apis/license-manager-user-subscriptions/2018-05-10/examples-1.json @@ -0,0 +1,5 @@ +{ + "version": "1.0", + "examples": { + } +} diff --git a/models/apis/license-manager-user-subscriptions/2018-05-10/paginators-1.json b/models/apis/license-manager-user-subscriptions/2018-05-10/paginators-1.json new file mode 100644 index 00000000000..a212681a987 --- /dev/null +++ b/models/apis/license-manager-user-subscriptions/2018-05-10/paginators-1.json @@ -0,0 +1,28 @@ +{ + "pagination": { + "ListIdentityProviders": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults", + "result_key": "IdentityProviderSummaries" + }, + "ListInstances": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults", + "result_key": "InstanceSummaries" + }, + "ListProductSubscriptions": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults", + "result_key": "ProductUserSummaries" + }, + "ListUserAssociations": { + "input_token": "NextToken", + "output_token": "NextToken", + "limit_key": "MaxResults", + "result_key": "InstanceUserSummaries" + } + } +} diff --git a/models/apis/personalize/2018-05-22/api-2.json b/models/apis/personalize/2018-05-22/api-2.json index 765053c4817..38e6a0f5f37 100644 --- a/models/apis/personalize/2018-05-22/api-2.json +++ b/models/apis/personalize/2018-05-22/api-2.json @@ -1274,7 +1274,8 @@ "datasetArn":{"shape":"Arn"}, "dataSource":{"shape":"DataSource"}, "roleArn":{"shape":"RoleArn"}, - "tags":{"shape":"Tags"} + "tags":{"shape":"Tags"}, + "importMode":{"shape":"ImportMode"} } }, "CreateDatasetImportJobResponse":{ @@ -1520,7 +1521,8 @@ "status":{"shape":"Status"}, "creationDateTime":{"shape":"Date"}, "lastUpdatedDateTime":{"shape":"Date"}, - "failureReason":{"shape":"FailureReason"} + "failureReason":{"shape":"FailureReason"}, + "importMode":{"shape":"ImportMode"} } }, "DatasetImportJobSummary":{ @@ -1531,7 +1533,8 @@ "status":{"shape":"Status"}, "creationDateTime":{"shape":"Date"}, "lastUpdatedDateTime":{"shape":"Date"}, - "failureReason":{"shape":"FailureReason"} + "failureReason":{"shape":"FailureReason"}, + "importMode":{"shape":"ImportMode"} } }, "DatasetImportJobs":{ @@ -2062,6 +2065,13 @@ "value":{"shape":"ParameterValue"}, "max":100 }, + "ImportMode":{ + "type":"string", + "enum":[ + "FULL", + "INCREMENTAL" + ] + }, "IngestionMode":{ "type":"string", "enum":[ diff --git a/models/apis/personalize/2018-05-22/docs-2.json b/models/apis/personalize/2018-05-22/docs-2.json index a1e21a3a89c..8b87b5d0845 100644 --- a/models/apis/personalize/2018-05-22/docs-2.json +++ b/models/apis/personalize/2018-05-22/docs-2.json @@ -8,7 +8,7 @@ "CreateDataset": "

Creates an empty dataset and adds it to the specified dataset group. Use CreateDatasetImportJob to import your training data to a dataset.

There are three types of datasets:

Each dataset type has an associated schema with required field types. Only the Interactions dataset is required in order to train a model (also referred to as creating a solution).

A dataset can be in one of the following states:

To get the status of the dataset, call DescribeDataset.

Related APIs

", "CreateDatasetExportJob": "

Creates a job that exports data from your dataset to an Amazon S3 bucket. To allow Amazon Personalize to export the training data, you must specify an service-linked IAM role that gives Amazon Personalize PutObject permissions for your Amazon S3 bucket. For information, see Exporting a dataset in the Amazon Personalize developer guide.

Status

A dataset export job can be in one of the following states:

To get the status of the export job, call DescribeDatasetExportJob, and specify the Amazon Resource Name (ARN) of the dataset export job. The dataset export is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

", "CreateDatasetGroup": "

Creates an empty dataset group. A dataset group is a container for Amazon Personalize resources. A dataset group can contain at most three datasets, one for each type of dataset:

A dataset group can be a Domain dataset group, where you specify a domain and use pre-configured resources like recommenders, or a Custom dataset group, where you use custom resources, such as a solution with a solution version, that you deploy with a campaign. If you start with a Domain dataset group, you can still add custom resources such as solutions and solution versions trained with recipes for custom use cases and deployed with campaigns.

A dataset group can be in one of the following states:

To get the status of the dataset group, call DescribeDatasetGroup. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the creation failed.

You must wait until the status of the dataset group is ACTIVE before adding a dataset to the group.

You can specify an Key Management Service (KMS) key to encrypt the datasets in the group. If you specify a KMS key, you must also include an Identity and Access Management (IAM) role that has permission to access the key.

APIs that require a dataset group ARN in the request

Related APIs

", - "CreateDatasetImportJob": "

Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an IAM service role that has permission to read from the data source, as Amazon Personalize makes a copy of your data and processes it internally. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources.

The dataset import job replaces any existing data in the dataset that you imported in bulk.

Status

A dataset import job can be in one of the following states:

To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset.

Related APIs

", + "CreateDatasetImportJob": "

Creates a job that imports training data from your data source (an Amazon S3 bucket) to an Amazon Personalize dataset. To allow Amazon Personalize to import the training data, you must specify an IAM service role that has permission to read from the data source, as Amazon Personalize makes a copy of your data and processes it internally. For information on granting access to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon S3 Resources.

By default, a dataset import job replaces any existing data in the dataset that you imported in bulk. To add new records without replacing existing data, specify INCREMENTAL for the import mode in the CreateDatasetImportJob operation.

Status

A dataset import job can be in one of the following states:

To get the status of the import job, call DescribeDatasetImportJob, providing the Amazon Resource Name (ARN) of the dataset import job. The dataset import is complete when the status shows as ACTIVE. If the status shows as CREATE FAILED, the response includes a failureReason key, which describes why the job failed.

Importing takes time. You must wait until the status shows as ACTIVE before training a model using the dataset.

Related APIs

", "CreateEventTracker": "

Creates an event tracker that you use when adding event data to a specified dataset group using the PutEvents API.

Only one event tracker can be associated with a dataset group. You will get an error if you call CreateEventTracker using the same dataset group as an existing event tracker.

When you create an event tracker, the response includes a tracking ID, which you pass as a parameter when you use the PutEvents operation. Amazon Personalize then appends the event data to the Interactions dataset of the dataset group you specify in your event tracker.

The event tracker can be in one of the following states:

To get the status of the event tracker, call DescribeEventTracker.

The event tracker must be in the ACTIVE state before using the tracking ID.

Related APIs

", "CreateFilter": "

Creates a recommendation filter. For more information, see Filtering recommendations and user segments.

", "CreateRecommender": "

Creates a recommender with the recipe (a Domain dataset group use case) you specify. You create recommenders for a Domain dataset group and specify the recommender's Amazon Resource Name (ARN) when you make a GetRecommendations request.

Minimum recommendation requests per second

When you create a recommender, you can configure the recommender's minimum recommendation requests per second. The minimum recommendation requests per second (minRecommendationRequestsPerSecond) specifies the baseline recommendation request throughput provisioned by Amazon Personalize. The default minRecommendationRequestsPerSecond is 1. A recommendation request is a single GetRecommendations operation. Request throughput is measured in requests per second and Amazon Personalize uses your requests per second to derive your requests per hour and the price of your recommender usage.

If your requests per second increases beyond minRecommendationRequestsPerSecond, Amazon Personalize auto-scales the provisioned capacity up and down, but never below minRecommendationRequestsPerSecond. There's a short time delay while the capacity is increased that might cause loss of requests.

Your bill is the greater of either the minimum requests per hour (based on minRecommendationRequestsPerSecond) or the actual number of requests. The actual request throughput used is calculated as the average requests/second within a one-hour window. We recommend starting with the default minRecommendationRequestsPerSecond, track your usage using Amazon CloudWatch metrics, and then increase the minRecommendationRequestsPerSecond as necessary.

Status

A recommender can be in one of the following states:

To get the recommender status, call DescribeRecommender.

Wait until the status of the recommender is ACTIVE before asking the recommender for recommendations.

Related APIs

", @@ -1156,6 +1156,14 @@ "TunedHPOParams$algorithmHyperParameters": "

A list of the hyperparameter values of the best performing model.

" } }, + "ImportMode": { + "base": null, + "refs": { + "CreateDatasetImportJobRequest$importMode": "

Specify how to add the new records to an existing dataset. The default import mode is FULL. If you haven't imported bulk records into the dataset previously, you can only specify FULL.

", + "DatasetImportJob$importMode": "

The import mode used by the dataset import job to import new records.

", + "DatasetImportJobSummary$importMode": "

The import mode the dataset import job used to update the data in the dataset. For more information see Updating existing bulk data.

" + } + }, "IngestionMode": { "base": null, "refs": { diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index 32213f4bebc..fb6850bc02e 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -7892,6 +7892,79 @@ } } }, + "license-manager-user-subscriptions" : { + "endpoints" : { + "af-south-1" : { }, + "ap-east-1" : { }, + "ap-northeast-1" : { }, + "ap-northeast-2" : { }, + "ap-northeast-3" : { }, + "ap-south-1" : { }, + "ap-southeast-1" : { }, + "ap-southeast-2" : { }, + "ca-central-1" : { }, + "eu-central-1" : { }, + "eu-north-1" : { }, + "eu-south-1" : { }, + "eu-west-1" : { }, + "eu-west-2" : { }, + "eu-west-3" : { }, + "fips-us-east-1" : { + "credentialScope" : { + "region" : "us-east-1" + }, + "deprecated" : true, + "hostname" : "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com" + }, + "fips-us-east-2" : { + "credentialScope" : { + "region" : "us-east-2" + }, + "deprecated" : true, + "hostname" : "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com" + }, + "fips-us-west-1" : { + "credentialScope" : { + "region" : "us-west-1" + }, + "deprecated" : true, + "hostname" : "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com" + }, + "fips-us-west-2" : { + "credentialScope" : { + "region" : "us-west-2" + }, + "deprecated" : true, + "hostname" : "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com" + }, + "me-south-1" : { }, + "sa-east-1" : { }, + "us-east-1" : { + "variants" : [ { + "hostname" : "license-manager-user-subscriptions-fips.us-east-1.amazonaws.com", + "tags" : [ "fips" ] + } ] + }, + "us-east-2" : { + "variants" : [ { + "hostname" : "license-manager-user-subscriptions-fips.us-east-2.amazonaws.com", + "tags" : [ "fips" ] + } ] + }, + "us-west-1" : { + "variants" : [ { + "hostname" : "license-manager-user-subscriptions-fips.us-west-1.amazonaws.com", + "tags" : [ "fips" ] + } ] + }, + "us-west-2" : { + "variants" : [ { + "hostname" : "license-manager-user-subscriptions-fips.us-west-2.amazonaws.com", + "tags" : [ "fips" ] + } ] + } + } + }, "lightsail" : { "endpoints" : { "ap-northeast-1" : { }, diff --git a/service/licensemanagerusersubscriptions/api.go b/service/licensemanagerusersubscriptions/api.go new file mode 100644 index 00000000000..5091faa2c30 --- /dev/null +++ b/service/licensemanagerusersubscriptions/api.go @@ -0,0 +1,3212 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "fmt" + + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/awsutil" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/private/protocol" +) + +const opAssociateUser = "AssociateUser" + +// AssociateUserRequest generates a "aws/request.Request" representing the +// client's request for the AssociateUser operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See AssociateUser for more information on using the AssociateUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the AssociateUserRequest method. +// req, resp := client.AssociateUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/AssociateUser +func (c *LicenseManagerUserSubscriptions) AssociateUserRequest(input *AssociateUserInput) (req *request.Request, output *AssociateUserOutput) { + op := &request.Operation{ + Name: opAssociateUser, + HTTPMethod: "POST", + HTTPPath: "/user/AssociateUser", + } + + if input == nil { + input = &AssociateUserInput{} + } + + output = &AssociateUserOutput{} + req = c.newRequest(op, input, output) + return +} + +// AssociateUser API operation for AWS License Manager User Subscriptions. +// +// Associates the user to an EC2 instance to utilize user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation AssociateUser for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/AssociateUser +func (c *LicenseManagerUserSubscriptions) AssociateUser(input *AssociateUserInput) (*AssociateUserOutput, error) { + req, out := c.AssociateUserRequest(input) + return out, req.Send() +} + +// AssociateUserWithContext is the same as AssociateUser with the addition of +// the ability to pass a context and additional request options. +// +// See AssociateUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) AssociateUserWithContext(ctx aws.Context, input *AssociateUserInput, opts ...request.Option) (*AssociateUserOutput, error) { + req, out := c.AssociateUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDeregisterIdentityProvider = "DeregisterIdentityProvider" + +// DeregisterIdentityProviderRequest generates a "aws/request.Request" representing the +// client's request for the DeregisterIdentityProvider operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DeregisterIdentityProvider for more information on using the DeregisterIdentityProvider +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DeregisterIdentityProviderRequest method. +// req, resp := client.DeregisterIdentityProviderRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/DeregisterIdentityProvider +func (c *LicenseManagerUserSubscriptions) DeregisterIdentityProviderRequest(input *DeregisterIdentityProviderInput) (req *request.Request, output *DeregisterIdentityProviderOutput) { + op := &request.Operation{ + Name: opDeregisterIdentityProvider, + HTTPMethod: "POST", + HTTPPath: "/identity-provider/DeregisterIdentityProvider", + } + + if input == nil { + input = &DeregisterIdentityProviderInput{} + } + + output = &DeregisterIdentityProviderOutput{} + req = c.newRequest(op, input, output) + return +} + +// DeregisterIdentityProvider API operation for AWS License Manager User Subscriptions. +// +// Deregisters the identity provider from providing user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation DeregisterIdentityProvider for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/DeregisterIdentityProvider +func (c *LicenseManagerUserSubscriptions) DeregisterIdentityProvider(input *DeregisterIdentityProviderInput) (*DeregisterIdentityProviderOutput, error) { + req, out := c.DeregisterIdentityProviderRequest(input) + return out, req.Send() +} + +// DeregisterIdentityProviderWithContext is the same as DeregisterIdentityProvider with the addition of +// the ability to pass a context and additional request options. +// +// See DeregisterIdentityProvider for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) DeregisterIdentityProviderWithContext(ctx aws.Context, input *DeregisterIdentityProviderInput, opts ...request.Option) (*DeregisterIdentityProviderOutput, error) { + req, out := c.DeregisterIdentityProviderRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opDisassociateUser = "DisassociateUser" + +// DisassociateUserRequest generates a "aws/request.Request" representing the +// client's request for the DisassociateUser operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See DisassociateUser for more information on using the DisassociateUser +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the DisassociateUserRequest method. +// req, resp := client.DisassociateUserRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/DisassociateUser +func (c *LicenseManagerUserSubscriptions) DisassociateUserRequest(input *DisassociateUserInput) (req *request.Request, output *DisassociateUserOutput) { + op := &request.Operation{ + Name: opDisassociateUser, + HTTPMethod: "POST", + HTTPPath: "/user/DisassociateUser", + } + + if input == nil { + input = &DisassociateUserInput{} + } + + output = &DisassociateUserOutput{} + req = c.newRequest(op, input, output) + return +} + +// DisassociateUser API operation for AWS License Manager User Subscriptions. +// +// Disassociates the user from an EC2 instance providing user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation DisassociateUser for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/DisassociateUser +func (c *LicenseManagerUserSubscriptions) DisassociateUser(input *DisassociateUserInput) (*DisassociateUserOutput, error) { + req, out := c.DisassociateUserRequest(input) + return out, req.Send() +} + +// DisassociateUserWithContext is the same as DisassociateUser with the addition of +// the ability to pass a context and additional request options. +// +// See DisassociateUser for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) DisassociateUserWithContext(ctx aws.Context, input *DisassociateUserInput, opts ...request.Option) (*DisassociateUserOutput, error) { + req, out := c.DisassociateUserRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opListIdentityProviders = "ListIdentityProviders" + +// ListIdentityProvidersRequest generates a "aws/request.Request" representing the +// client's request for the ListIdentityProviders operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListIdentityProviders for more information on using the ListIdentityProviders +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListIdentityProvidersRequest method. +// req, resp := client.ListIdentityProvidersRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListIdentityProviders +func (c *LicenseManagerUserSubscriptions) ListIdentityProvidersRequest(input *ListIdentityProvidersInput) (req *request.Request, output *ListIdentityProvidersOutput) { + op := &request.Operation{ + Name: opListIdentityProviders, + HTTPMethod: "POST", + HTTPPath: "/identity-provider/ListIdentityProviders", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListIdentityProvidersInput{} + } + + output = &ListIdentityProvidersOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListIdentityProviders API operation for AWS License Manager User Subscriptions. +// +// Lists the identity providers for user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation ListIdentityProviders for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListIdentityProviders +func (c *LicenseManagerUserSubscriptions) ListIdentityProviders(input *ListIdentityProvidersInput) (*ListIdentityProvidersOutput, error) { + req, out := c.ListIdentityProvidersRequest(input) + return out, req.Send() +} + +// ListIdentityProvidersWithContext is the same as ListIdentityProviders with the addition of +// the ability to pass a context and additional request options. +// +// See ListIdentityProviders for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListIdentityProvidersWithContext(ctx aws.Context, input *ListIdentityProvidersInput, opts ...request.Option) (*ListIdentityProvidersOutput, error) { + req, out := c.ListIdentityProvidersRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListIdentityProvidersPages iterates over the pages of a ListIdentityProviders operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListIdentityProviders method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListIdentityProviders operation. +// pageNum := 0 +// err := client.ListIdentityProvidersPages(params, +// func(page *licensemanagerusersubscriptions.ListIdentityProvidersOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *LicenseManagerUserSubscriptions) ListIdentityProvidersPages(input *ListIdentityProvidersInput, fn func(*ListIdentityProvidersOutput, bool) bool) error { + return c.ListIdentityProvidersPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListIdentityProvidersPagesWithContext same as ListIdentityProvidersPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListIdentityProvidersPagesWithContext(ctx aws.Context, input *ListIdentityProvidersInput, fn func(*ListIdentityProvidersOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListIdentityProvidersInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListIdentityProvidersRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListIdentityProvidersOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListInstances = "ListInstances" + +// ListInstancesRequest generates a "aws/request.Request" representing the +// client's request for the ListInstances operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListInstances for more information on using the ListInstances +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListInstancesRequest method. +// req, resp := client.ListInstancesRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListInstances +func (c *LicenseManagerUserSubscriptions) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) { + op := &request.Operation{ + Name: opListInstances, + HTTPMethod: "POST", + HTTPPath: "/instance/ListInstances", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListInstancesInput{} + } + + output = &ListInstancesOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListInstances API operation for AWS License Manager User Subscriptions. +// +// Lists the EC2 instances providing user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation ListInstances for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListInstances +func (c *LicenseManagerUserSubscriptions) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { + req, out := c.ListInstancesRequest(input) + return out, req.Send() +} + +// ListInstancesWithContext is the same as ListInstances with the addition of +// the ability to pass a context and additional request options. +// +// See ListInstances for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) { + req, out := c.ListInstancesRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListInstancesPages iterates over the pages of a ListInstances operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListInstances method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListInstances operation. +// pageNum := 0 +// err := client.ListInstancesPages(params, +// func(page *licensemanagerusersubscriptions.ListInstancesOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *LicenseManagerUserSubscriptions) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error { + return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListInstancesPagesWithContext same as ListInstancesPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListInstancesInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListInstancesRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListProductSubscriptions = "ListProductSubscriptions" + +// ListProductSubscriptionsRequest generates a "aws/request.Request" representing the +// client's request for the ListProductSubscriptions operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListProductSubscriptions for more information on using the ListProductSubscriptions +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListProductSubscriptionsRequest method. +// req, resp := client.ListProductSubscriptionsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListProductSubscriptions +func (c *LicenseManagerUserSubscriptions) ListProductSubscriptionsRequest(input *ListProductSubscriptionsInput) (req *request.Request, output *ListProductSubscriptionsOutput) { + op := &request.Operation{ + Name: opListProductSubscriptions, + HTTPMethod: "POST", + HTTPPath: "/user/ListProductSubscriptions", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListProductSubscriptionsInput{} + } + + output = &ListProductSubscriptionsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListProductSubscriptions API operation for AWS License Manager User Subscriptions. +// +// Lists the user-based subscription products available from an identity provider. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation ListProductSubscriptions for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListProductSubscriptions +func (c *LicenseManagerUserSubscriptions) ListProductSubscriptions(input *ListProductSubscriptionsInput) (*ListProductSubscriptionsOutput, error) { + req, out := c.ListProductSubscriptionsRequest(input) + return out, req.Send() +} + +// ListProductSubscriptionsWithContext is the same as ListProductSubscriptions with the addition of +// the ability to pass a context and additional request options. +// +// See ListProductSubscriptions for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListProductSubscriptionsWithContext(ctx aws.Context, input *ListProductSubscriptionsInput, opts ...request.Option) (*ListProductSubscriptionsOutput, error) { + req, out := c.ListProductSubscriptionsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListProductSubscriptionsPages iterates over the pages of a ListProductSubscriptions operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListProductSubscriptions method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListProductSubscriptions operation. +// pageNum := 0 +// err := client.ListProductSubscriptionsPages(params, +// func(page *licensemanagerusersubscriptions.ListProductSubscriptionsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *LicenseManagerUserSubscriptions) ListProductSubscriptionsPages(input *ListProductSubscriptionsInput, fn func(*ListProductSubscriptionsOutput, bool) bool) error { + return c.ListProductSubscriptionsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListProductSubscriptionsPagesWithContext same as ListProductSubscriptionsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListProductSubscriptionsPagesWithContext(ctx aws.Context, input *ListProductSubscriptionsInput, fn func(*ListProductSubscriptionsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListProductSubscriptionsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListProductSubscriptionsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListProductSubscriptionsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opListUserAssociations = "ListUserAssociations" + +// ListUserAssociationsRequest generates a "aws/request.Request" representing the +// client's request for the ListUserAssociations operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See ListUserAssociations for more information on using the ListUserAssociations +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the ListUserAssociationsRequest method. +// req, resp := client.ListUserAssociationsRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListUserAssociations +func (c *LicenseManagerUserSubscriptions) ListUserAssociationsRequest(input *ListUserAssociationsInput) (req *request.Request, output *ListUserAssociationsOutput) { + op := &request.Operation{ + Name: opListUserAssociations, + HTTPMethod: "POST", + HTTPPath: "/user/ListUserAssociations", + Paginator: &request.Paginator{ + InputTokens: []string{"NextToken"}, + OutputTokens: []string{"NextToken"}, + LimitToken: "MaxResults", + TruncationToken: "", + }, + } + + if input == nil { + input = &ListUserAssociationsInput{} + } + + output = &ListUserAssociationsOutput{} + req = c.newRequest(op, input, output) + return +} + +// ListUserAssociations API operation for AWS License Manager User Subscriptions. +// +// Lists user associations for an identity provider. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation ListUserAssociations for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/ListUserAssociations +func (c *LicenseManagerUserSubscriptions) ListUserAssociations(input *ListUserAssociationsInput) (*ListUserAssociationsOutput, error) { + req, out := c.ListUserAssociationsRequest(input) + return out, req.Send() +} + +// ListUserAssociationsWithContext is the same as ListUserAssociations with the addition of +// the ability to pass a context and additional request options. +// +// See ListUserAssociations for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListUserAssociationsWithContext(ctx aws.Context, input *ListUserAssociationsInput, opts ...request.Option) (*ListUserAssociationsOutput, error) { + req, out := c.ListUserAssociationsRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// ListUserAssociationsPages iterates over the pages of a ListUserAssociations operation, +// calling the "fn" function with the response data for each page. To stop +// iterating, return false from the fn function. +// +// See ListUserAssociations method for more information on how to use this operation. +// +// Note: This operation can generate multiple requests to a service. +// +// // Example iterating over at most 3 pages of a ListUserAssociations operation. +// pageNum := 0 +// err := client.ListUserAssociationsPages(params, +// func(page *licensemanagerusersubscriptions.ListUserAssociationsOutput, lastPage bool) bool { +// pageNum++ +// fmt.Println(page) +// return pageNum <= 3 +// }) +// +func (c *LicenseManagerUserSubscriptions) ListUserAssociationsPages(input *ListUserAssociationsInput, fn func(*ListUserAssociationsOutput, bool) bool) error { + return c.ListUserAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) +} + +// ListUserAssociationsPagesWithContext same as ListUserAssociationsPages except +// it takes a Context and allows setting request options on the pages. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) ListUserAssociationsPagesWithContext(ctx aws.Context, input *ListUserAssociationsInput, fn func(*ListUserAssociationsOutput, bool) bool, opts ...request.Option) error { + p := request.Pagination{ + NewRequest: func() (*request.Request, error) { + var inCpy *ListUserAssociationsInput + if input != nil { + tmp := *input + inCpy = &tmp + } + req, _ := c.ListUserAssociationsRequest(inCpy) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return req, nil + }, + } + + for p.Next() { + if !fn(p.Page().(*ListUserAssociationsOutput), !p.HasNextPage()) { + break + } + } + + return p.Err() +} + +const opRegisterIdentityProvider = "RegisterIdentityProvider" + +// RegisterIdentityProviderRequest generates a "aws/request.Request" representing the +// client's request for the RegisterIdentityProvider operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RegisterIdentityProvider for more information on using the RegisterIdentityProvider +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RegisterIdentityProviderRequest method. +// req, resp := client.RegisterIdentityProviderRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/RegisterIdentityProvider +func (c *LicenseManagerUserSubscriptions) RegisterIdentityProviderRequest(input *RegisterIdentityProviderInput) (req *request.Request, output *RegisterIdentityProviderOutput) { + op := &request.Operation{ + Name: opRegisterIdentityProvider, + HTTPMethod: "POST", + HTTPPath: "/identity-provider/RegisterIdentityProvider", + } + + if input == nil { + input = &RegisterIdentityProviderInput{} + } + + output = &RegisterIdentityProviderOutput{} + req = c.newRequest(op, input, output) + return +} + +// RegisterIdentityProvider API operation for AWS License Manager User Subscriptions. +// +// Registers an identity provider for user-based subscriptions. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation RegisterIdentityProvider for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/RegisterIdentityProvider +func (c *LicenseManagerUserSubscriptions) RegisterIdentityProvider(input *RegisterIdentityProviderInput) (*RegisterIdentityProviderOutput, error) { + req, out := c.RegisterIdentityProviderRequest(input) + return out, req.Send() +} + +// RegisterIdentityProviderWithContext is the same as RegisterIdentityProvider with the addition of +// the ability to pass a context and additional request options. +// +// See RegisterIdentityProvider for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) RegisterIdentityProviderWithContext(ctx aws.Context, input *RegisterIdentityProviderInput, opts ...request.Option) (*RegisterIdentityProviderOutput, error) { + req, out := c.RegisterIdentityProviderRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStartProductSubscription = "StartProductSubscription" + +// StartProductSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the StartProductSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StartProductSubscription for more information on using the StartProductSubscription +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StartProductSubscriptionRequest method. +// req, resp := client.StartProductSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/StartProductSubscription +func (c *LicenseManagerUserSubscriptions) StartProductSubscriptionRequest(input *StartProductSubscriptionInput) (req *request.Request, output *StartProductSubscriptionOutput) { + op := &request.Operation{ + Name: opStartProductSubscription, + HTTPMethod: "POST", + HTTPPath: "/user/StartProductSubscription", + } + + if input == nil { + input = &StartProductSubscriptionInput{} + } + + output = &StartProductSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StartProductSubscription API operation for AWS License Manager User Subscriptions. +// +// Starts a product subscription for a user with the specified identity provider. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation StartProductSubscription for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/StartProductSubscription +func (c *LicenseManagerUserSubscriptions) StartProductSubscription(input *StartProductSubscriptionInput) (*StartProductSubscriptionOutput, error) { + req, out := c.StartProductSubscriptionRequest(input) + return out, req.Send() +} + +// StartProductSubscriptionWithContext is the same as StartProductSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See StartProductSubscription for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) StartProductSubscriptionWithContext(ctx aws.Context, input *StartProductSubscriptionInput, opts ...request.Option) (*StartProductSubscriptionOutput, error) { + req, out := c.StartProductSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +const opStopProductSubscription = "StopProductSubscription" + +// StopProductSubscriptionRequest generates a "aws/request.Request" representing the +// client's request for the StopProductSubscription operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See StopProductSubscription for more information on using the StopProductSubscription +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the StopProductSubscriptionRequest method. +// req, resp := client.StopProductSubscriptionRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/StopProductSubscription +func (c *LicenseManagerUserSubscriptions) StopProductSubscriptionRequest(input *StopProductSubscriptionInput) (req *request.Request, output *StopProductSubscriptionOutput) { + op := &request.Operation{ + Name: opStopProductSubscription, + HTTPMethod: "POST", + HTTPPath: "/user/StopProductSubscription", + } + + if input == nil { + input = &StopProductSubscriptionInput{} + } + + output = &StopProductSubscriptionOutput{} + req = c.newRequest(op, input, output) + return +} + +// StopProductSubscription API operation for AWS License Manager User Subscriptions. +// +// Stops a product subscription for a user with the specified identity provider. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for AWS License Manager User Subscriptions's +// API operation StopProductSubscription for usage and error information. +// +// Returned Error Types: +// * ServiceQuotaExceededException +// The request failed because a service quota is exceeded. +// +// * ConflictException +// The request couldn't be completed because it conflicted with the current +// state of the resource. +// +// * ValidationException +// A parameter is not valid. +// +// * ThrottlingException +// The request was denied because of request throttling. Retry the request. +// +// * InternalServerException +// An exception occurred with the service. +// +// * ResourceNotFoundException +// The resource couldn't be found. +// +// * AccessDeniedException +// You don't have sufficient access to perform this action. +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10/StopProductSubscription +func (c *LicenseManagerUserSubscriptions) StopProductSubscription(input *StopProductSubscriptionInput) (*StopProductSubscriptionOutput, error) { + req, out := c.StopProductSubscriptionRequest(input) + return out, req.Send() +} + +// StopProductSubscriptionWithContext is the same as StopProductSubscription with the addition of +// the ability to pass a context and additional request options. +// +// See StopProductSubscription for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *LicenseManagerUserSubscriptions) StopProductSubscriptionWithContext(ctx aws.Context, input *StopProductSubscriptionInput, opts ...request.Option) (*StopProductSubscriptionOutput, error) { + req, out := c.StopProductSubscriptionRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + +// You don't have sufficient access to perform this action. +type AccessDeniedException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AccessDeniedException) GoString() string { + return s.String() +} + +func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { + return &AccessDeniedException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *AccessDeniedException) Code() string { + return "AccessDeniedException" +} + +// Message returns the exception's message. +func (s *AccessDeniedException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *AccessDeniedException) OrigErr() error { + return nil +} + +func (s *AccessDeniedException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *AccessDeniedException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *AccessDeniedException) RequestID() string { + return s.RespMetadata.RequestID +} + +// Details about an Active Directory identity provider. +type ActiveDirectoryIdentityProvider struct { + _ struct{} `type:"structure"` + + // The directory ID for an Active Directory identity provider. + DirectoryId *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ActiveDirectoryIdentityProvider) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ActiveDirectoryIdentityProvider) GoString() string { + return s.String() +} + +// SetDirectoryId sets the DirectoryId field's value. +func (s *ActiveDirectoryIdentityProvider) SetDirectoryId(v string) *ActiveDirectoryIdentityProvider { + s.DirectoryId = &v + return s +} + +type AssociateUserInput struct { + _ struct{} `type:"structure"` + + // The domain name of the user. + Domain *string `type:"string"` + + // The identity provider of the user. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The ID of the EC2 instance, which provides user-based subscriptions. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // The user name from the identity provider for the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *AssociateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "AssociateUserInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *AssociateUserInput) SetDomain(v string) *AssociateUserInput { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *AssociateUserInput) SetIdentityProvider(v *IdentityProvider) *AssociateUserInput { + s.IdentityProvider = v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *AssociateUserInput) SetInstanceId(v string) *AssociateUserInput { + s.InstanceId = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *AssociateUserInput) SetUsername(v string) *AssociateUserInput { + s.Username = &v + return s +} + +type AssociateUserOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the associate user operation. + // + // InstanceUserSummary is a required field + InstanceUserSummary *InstanceUserSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s AssociateUserOutput) GoString() string { + return s.String() +} + +// SetInstanceUserSummary sets the InstanceUserSummary field's value. +func (s *AssociateUserOutput) SetInstanceUserSummary(v *InstanceUserSummary) *AssociateUserOutput { + s.InstanceUserSummary = v + return s +} + +// The request couldn't be completed because it conflicted with the current +// state of the resource. +type ConflictException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ConflictException) GoString() string { + return s.String() +} + +func newErrorConflictException(v protocol.ResponseMetadata) error { + return &ConflictException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ConflictException) Code() string { + return "ConflictException" +} + +// Message returns the exception's message. +func (s *ConflictException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ConflictException) OrigErr() error { + return nil +} + +func (s *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ConflictException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ConflictException) RequestID() string { + return s.RespMetadata.RequestID +} + +type DeregisterIdentityProviderInput struct { + _ struct{} `type:"structure"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeregisterIdentityProviderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeregisterIdentityProviderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DeregisterIdentityProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DeregisterIdentityProviderInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.Product == nil { + invalidParams.Add(request.NewErrParamRequired("Product")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *DeregisterIdentityProviderInput) SetIdentityProvider(v *IdentityProvider) *DeregisterIdentityProviderInput { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *DeregisterIdentityProviderInput) SetProduct(v string) *DeregisterIdentityProviderInput { + s.Product = &v + return s +} + +type DeregisterIdentityProviderOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the results of an identity provider operation. + // + // IdentityProviderSummary is a required field + IdentityProviderSummary *IdentityProviderSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeregisterIdentityProviderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DeregisterIdentityProviderOutput) GoString() string { + return s.String() +} + +// SetIdentityProviderSummary sets the IdentityProviderSummary field's value. +func (s *DeregisterIdentityProviderOutput) SetIdentityProviderSummary(v *IdentityProviderSummary) *DeregisterIdentityProviderOutput { + s.IdentityProviderSummary = v + return s +} + +type DisassociateUserInput struct { + _ struct{} `type:"structure"` + + // The domain name of the user. + Domain *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The ID of the EC2 instance, which provides user-based subscriptions. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // The user name from the identity provider for the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateUserInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateUserInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *DisassociateUserInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "DisassociateUserInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *DisassociateUserInput) SetDomain(v string) *DisassociateUserInput { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *DisassociateUserInput) SetIdentityProvider(v *IdentityProvider) *DisassociateUserInput { + s.IdentityProvider = v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *DisassociateUserInput) SetInstanceId(v string) *DisassociateUserInput { + s.InstanceId = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *DisassociateUserInput) SetUsername(v string) *DisassociateUserInput { + s.Username = &v + return s +} + +type DisassociateUserOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the associate user operation. + // + // InstanceUserSummary is a required field + InstanceUserSummary *InstanceUserSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateUserOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s DisassociateUserOutput) GoString() string { + return s.String() +} + +// SetInstanceUserSummary sets the InstanceUserSummary field's value. +func (s *DisassociateUserOutput) SetInstanceUserSummary(v *InstanceUserSummary) *DisassociateUserOutput { + s.InstanceUserSummary = v + return s +} + +// A filter name and value pair that is used to return more specific results +// from a describe operation. Filters can be used to match a set of resources +// by specific criteria, such as tags, attributes, or IDs. +type Filter struct { + _ struct{} `type:"structure"` + + // The name of an attribute to use as a filter. + Attribute *string `type:"string"` + + // The type of search (For example, eq, geq, leq) + Operation *string `type:"string"` + + // Value of the filter. + Value *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Filter) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s Filter) GoString() string { + return s.String() +} + +// SetAttribute sets the Attribute field's value. +func (s *Filter) SetAttribute(v string) *Filter { + s.Attribute = &v + return s +} + +// SetOperation sets the Operation field's value. +func (s *Filter) SetOperation(v string) *Filter { + s.Operation = &v + return s +} + +// SetValue sets the Value field's value. +func (s *Filter) SetValue(v string) *Filter { + s.Value = &v + return s +} + +// Details about an identity provider. +type IdentityProvider struct { + _ struct{} `type:"structure"` + + // An object that details an Active Directory identity provider. + ActiveDirectoryIdentityProvider *ActiveDirectoryIdentityProvider `type:"structure"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s IdentityProvider) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s IdentityProvider) GoString() string { + return s.String() +} + +// SetActiveDirectoryIdentityProvider sets the ActiveDirectoryIdentityProvider field's value. +func (s *IdentityProvider) SetActiveDirectoryIdentityProvider(v *ActiveDirectoryIdentityProvider) *IdentityProvider { + s.ActiveDirectoryIdentityProvider = v + return s +} + +// Describes an identity provider. +type IdentityProviderSummary struct { + _ struct{} `type:"structure"` + + // The failure message associated with an identity provider. + FailureMessage *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` + + // The status of an identity provider. + // + // Status is a required field + Status *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s IdentityProviderSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s IdentityProviderSummary) GoString() string { + return s.String() +} + +// SetFailureMessage sets the FailureMessage field's value. +func (s *IdentityProviderSummary) SetFailureMessage(v string) *IdentityProviderSummary { + s.FailureMessage = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *IdentityProviderSummary) SetIdentityProvider(v *IdentityProvider) *IdentityProviderSummary { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *IdentityProviderSummary) SetProduct(v string) *IdentityProviderSummary { + s.Product = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *IdentityProviderSummary) SetStatus(v string) *IdentityProviderSummary { + s.Status = &v + return s +} + +// Describes an EC2 instance providing user-based subscriptions. +type InstanceSummary struct { + _ struct{} `type:"structure"` + + // The ID of the EC2 instance, which provides user-based subscriptions. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // The date of the last status check. + LastStatusCheckDate *string `type:"string"` + + // A list of provided user-based subscription products. + // + // Products is a required field + Products []*string `type:"list" required:"true"` + + // The status of an EC2 instance resource. + // + // Status is a required field + Status *string `type:"string" required:"true"` + + // The status message for an EC2 instance. + StatusMessage *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceSummary) GoString() string { + return s.String() +} + +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceSummary) SetInstanceId(v string) *InstanceSummary { + s.InstanceId = &v + return s +} + +// SetLastStatusCheckDate sets the LastStatusCheckDate field's value. +func (s *InstanceSummary) SetLastStatusCheckDate(v string) *InstanceSummary { + s.LastStatusCheckDate = &v + return s +} + +// SetProducts sets the Products field's value. +func (s *InstanceSummary) SetProducts(v []*string) *InstanceSummary { + s.Products = v + return s +} + +// SetStatus sets the Status field's value. +func (s *InstanceSummary) SetStatus(v string) *InstanceSummary { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *InstanceSummary) SetStatusMessage(v string) *InstanceSummary { + s.StatusMessage = &v + return s +} + +// Describes users of an EC2 instance providing user-based subscriptions. +type InstanceUserSummary struct { + _ struct{} `type:"structure"` + + // The date a user was associated with an EC2 instance. + AssociationDate *string `type:"string"` + + // The date a user was disassociated from an EC2 instance. + DisassociationDate *string `type:"string"` + + // The domain name of the user. + Domain *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The ID of the EC2 instance, which provides user-based subscriptions. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // The status of a user associated with an EC2 instance. + // + // Status is a required field + Status *string `type:"string" required:"true"` + + // The status message for users of an EC2 instance. + StatusMessage *string `type:"string"` + + // The user name from the identity provider for the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceUserSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InstanceUserSummary) GoString() string { + return s.String() +} + +// SetAssociationDate sets the AssociationDate field's value. +func (s *InstanceUserSummary) SetAssociationDate(v string) *InstanceUserSummary { + s.AssociationDate = &v + return s +} + +// SetDisassociationDate sets the DisassociationDate field's value. +func (s *InstanceUserSummary) SetDisassociationDate(v string) *InstanceUserSummary { + s.DisassociationDate = &v + return s +} + +// SetDomain sets the Domain field's value. +func (s *InstanceUserSummary) SetDomain(v string) *InstanceUserSummary { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *InstanceUserSummary) SetIdentityProvider(v *IdentityProvider) *InstanceUserSummary { + s.IdentityProvider = v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *InstanceUserSummary) SetInstanceId(v string) *InstanceUserSummary { + s.InstanceId = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *InstanceUserSummary) SetStatus(v string) *InstanceUserSummary { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *InstanceUserSummary) SetStatusMessage(v string) *InstanceUserSummary { + s.StatusMessage = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *InstanceUserSummary) SetUsername(v string) *InstanceUserSummary { + s.Username = &v + return s +} + +// An exception occurred with the service. +type InternalServerException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s InternalServerException) GoString() string { + return s.String() +} + +func newErrorInternalServerException(v protocol.ResponseMetadata) error { + return &InternalServerException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *InternalServerException) Code() string { + return "InternalServerException" +} + +// Message returns the exception's message. +func (s *InternalServerException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *InternalServerException) OrigErr() error { + return nil +} + +func (s *InternalServerException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *InternalServerException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *InternalServerException) RequestID() string { + return s.RespMetadata.RequestID +} + +type ListIdentityProvidersInput struct { + _ struct{} `type:"structure"` + + // Maximum number of results to return in a single call. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListIdentityProvidersInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListIdentityProvidersInput) GoString() string { + return s.String() +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListIdentityProvidersInput) SetMaxResults(v int64) *ListIdentityProvidersInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListIdentityProvidersInput) SetNextToken(v string) *ListIdentityProvidersInput { + s.NextToken = &v + return s +} + +type ListIdentityProvidersOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the list identity providers operation. + // + // IdentityProviderSummaries is a required field + IdentityProviderSummaries []*IdentityProviderSummary `type:"list" required:"true"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListIdentityProvidersOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListIdentityProvidersOutput) GoString() string { + return s.String() +} + +// SetIdentityProviderSummaries sets the IdentityProviderSummaries field's value. +func (s *ListIdentityProvidersOutput) SetIdentityProviderSummaries(v []*IdentityProviderSummary) *ListIdentityProvidersOutput { + s.IdentityProviderSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListIdentityProvidersOutput) SetNextToken(v string) *ListIdentityProvidersOutput { + s.NextToken = &v + return s +} + +type ListInstancesInput struct { + _ struct{} `type:"structure"` + + // An array of structures that you can use to filter the results to those that + // match one or more sets of key-value pairs that you specify. + Filters []*Filter `type:"list"` + + // Maximum number of results to return in a single call. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListInstancesInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListInstancesInput) GoString() string { + return s.String() +} + +// SetFilters sets the Filters field's value. +func (s *ListInstancesInput) SetFilters(v []*Filter) *ListInstancesInput { + s.Filters = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListInstancesInput) SetMaxResults(v int64) *ListInstancesInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInstancesInput) SetNextToken(v string) *ListInstancesInput { + s.NextToken = &v + return s +} + +type ListInstancesOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the list instances operation. + InstanceSummaries []*InstanceSummary `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListInstancesOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListInstancesOutput) GoString() string { + return s.String() +} + +// SetInstanceSummaries sets the InstanceSummaries field's value. +func (s *ListInstancesOutput) SetInstanceSummaries(v []*InstanceSummary) *ListInstancesOutput { + s.InstanceSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListInstancesOutput) SetNextToken(v string) *ListInstancesOutput { + s.NextToken = &v + return s +} + +type ListProductSubscriptionsInput struct { + _ struct{} `type:"structure"` + + // An array of structures that you can use to filter the results to those that + // match one or more sets of key-value pairs that you specify. + Filters []*Filter `type:"list"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // Maximum number of results to return in a single call. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListProductSubscriptionsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListProductSubscriptionsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListProductSubscriptionsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListProductSubscriptionsInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.Product == nil { + invalidParams.Add(request.NewErrParamRequired("Product")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListProductSubscriptionsInput) SetFilters(v []*Filter) *ListProductSubscriptionsInput { + s.Filters = v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *ListProductSubscriptionsInput) SetIdentityProvider(v *IdentityProvider) *ListProductSubscriptionsInput { + s.IdentityProvider = v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListProductSubscriptionsInput) SetMaxResults(v int64) *ListProductSubscriptionsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListProductSubscriptionsInput) SetNextToken(v string) *ListProductSubscriptionsInput { + s.NextToken = &v + return s +} + +// SetProduct sets the Product field's value. +func (s *ListProductSubscriptionsInput) SetProduct(v string) *ListProductSubscriptionsInput { + s.Product = &v + return s +} + +type ListProductSubscriptionsOutput struct { + _ struct{} `type:"structure"` + + // Token for the next set of results. + NextToken *string `type:"string"` + + // Metadata that describes the list product subscriptions operation. + ProductUserSummaries []*ProductUserSummary `type:"list"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListProductSubscriptionsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListProductSubscriptionsOutput) GoString() string { + return s.String() +} + +// SetNextToken sets the NextToken field's value. +func (s *ListProductSubscriptionsOutput) SetNextToken(v string) *ListProductSubscriptionsOutput { + s.NextToken = &v + return s +} + +// SetProductUserSummaries sets the ProductUserSummaries field's value. +func (s *ListProductSubscriptionsOutput) SetProductUserSummaries(v []*ProductUserSummary) *ListProductSubscriptionsOutput { + s.ProductUserSummaries = v + return s +} + +type ListUserAssociationsInput struct { + _ struct{} `type:"structure"` + + // An array of structures that you can use to filter the results to those that + // match one or more sets of key-value pairs that you specify. + Filters []*Filter `type:"list"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The ID of the EC2 instance, which provides user-based subscriptions. + // + // InstanceId is a required field + InstanceId *string `type:"string" required:"true"` + + // Maximum number of results to return in a single call. + MaxResults *int64 `type:"integer"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListUserAssociationsInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListUserAssociationsInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *ListUserAssociationsInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "ListUserAssociationsInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.InstanceId == nil { + invalidParams.Add(request.NewErrParamRequired("InstanceId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetFilters sets the Filters field's value. +func (s *ListUserAssociationsInput) SetFilters(v []*Filter) *ListUserAssociationsInput { + s.Filters = v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *ListUserAssociationsInput) SetIdentityProvider(v *IdentityProvider) *ListUserAssociationsInput { + s.IdentityProvider = v + return s +} + +// SetInstanceId sets the InstanceId field's value. +func (s *ListUserAssociationsInput) SetInstanceId(v string) *ListUserAssociationsInput { + s.InstanceId = &v + return s +} + +// SetMaxResults sets the MaxResults field's value. +func (s *ListUserAssociationsInput) SetMaxResults(v int64) *ListUserAssociationsInput { + s.MaxResults = &v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUserAssociationsInput) SetNextToken(v string) *ListUserAssociationsInput { + s.NextToken = &v + return s +} + +type ListUserAssociationsOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the list user association operation. + InstanceUserSummaries []*InstanceUserSummary `type:"list"` + + // Token for the next set of results. + NextToken *string `type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListUserAssociationsOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ListUserAssociationsOutput) GoString() string { + return s.String() +} + +// SetInstanceUserSummaries sets the InstanceUserSummaries field's value. +func (s *ListUserAssociationsOutput) SetInstanceUserSummaries(v []*InstanceUserSummary) *ListUserAssociationsOutput { + s.InstanceUserSummaries = v + return s +} + +// SetNextToken sets the NextToken field's value. +func (s *ListUserAssociationsOutput) SetNextToken(v string) *ListUserAssociationsOutput { + s.NextToken = &v + return s +} + +// The summary of the user-based subscription products for a user. +type ProductUserSummary struct { + _ struct{} `type:"structure"` + + // The domain name of the user. + Domain *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` + + // The status of a product for a user. + // + // Status is a required field + Status *string `type:"string" required:"true"` + + // The status message for a product for a user. + StatusMessage *string `type:"string"` + + // The end date of a subscription. + SubscriptionEndDate *string `type:"string"` + + // The start date of a subscription. + SubscriptionStartDate *string `type:"string"` + + // The user name from the identity provider of the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ProductUserSummary) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ProductUserSummary) GoString() string { + return s.String() +} + +// SetDomain sets the Domain field's value. +func (s *ProductUserSummary) SetDomain(v string) *ProductUserSummary { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *ProductUserSummary) SetIdentityProvider(v *IdentityProvider) *ProductUserSummary { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *ProductUserSummary) SetProduct(v string) *ProductUserSummary { + s.Product = &v + return s +} + +// SetStatus sets the Status field's value. +func (s *ProductUserSummary) SetStatus(v string) *ProductUserSummary { + s.Status = &v + return s +} + +// SetStatusMessage sets the StatusMessage field's value. +func (s *ProductUserSummary) SetStatusMessage(v string) *ProductUserSummary { + s.StatusMessage = &v + return s +} + +// SetSubscriptionEndDate sets the SubscriptionEndDate field's value. +func (s *ProductUserSummary) SetSubscriptionEndDate(v string) *ProductUserSummary { + s.SubscriptionEndDate = &v + return s +} + +// SetSubscriptionStartDate sets the SubscriptionStartDate field's value. +func (s *ProductUserSummary) SetSubscriptionStartDate(v string) *ProductUserSummary { + s.SubscriptionStartDate = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *ProductUserSummary) SetUsername(v string) *ProductUserSummary { + s.Username = &v + return s +} + +type RegisterIdentityProviderInput struct { + _ struct{} `type:"structure"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterIdentityProviderInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterIdentityProviderInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RegisterIdentityProviderInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RegisterIdentityProviderInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.Product == nil { + invalidParams.Add(request.NewErrParamRequired("Product")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *RegisterIdentityProviderInput) SetIdentityProvider(v *IdentityProvider) *RegisterIdentityProviderInput { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *RegisterIdentityProviderInput) SetProduct(v string) *RegisterIdentityProviderInput { + s.Product = &v + return s +} + +type RegisterIdentityProviderOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the results of an identity provider operation. + // + // IdentityProviderSummary is a required field + IdentityProviderSummary *IdentityProviderSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterIdentityProviderOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s RegisterIdentityProviderOutput) GoString() string { + return s.String() +} + +// SetIdentityProviderSummary sets the IdentityProviderSummary field's value. +func (s *RegisterIdentityProviderOutput) SetIdentityProviderSummary(v *IdentityProviderSummary) *RegisterIdentityProviderOutput { + s.IdentityProviderSummary = v + return s +} + +// The resource couldn't be found. +type ResourceNotFoundException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ResourceNotFoundException) GoString() string { + return s.String() +} + +func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { + return &ResourceNotFoundException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ResourceNotFoundException) Code() string { + return "ResourceNotFoundException" +} + +// Message returns the exception's message. +func (s *ResourceNotFoundException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ResourceNotFoundException) OrigErr() error { + return nil +} + +func (s *ResourceNotFoundException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ResourceNotFoundException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ResourceNotFoundException) RequestID() string { + return s.RespMetadata.RequestID +} + +// The request failed because a service quota is exceeded. +type ServiceQuotaExceededException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ServiceQuotaExceededException) GoString() string { + return s.String() +} + +func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error { + return &ServiceQuotaExceededException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ServiceQuotaExceededException) Code() string { + return "ServiceQuotaExceededException" +} + +// Message returns the exception's message. +func (s *ServiceQuotaExceededException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ServiceQuotaExceededException) OrigErr() error { + return nil +} + +func (s *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ServiceQuotaExceededException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ServiceQuotaExceededException) RequestID() string { + return s.RespMetadata.RequestID +} + +type StartProductSubscriptionInput struct { + _ struct{} `type:"structure"` + + // The domain name of the user. + Domain *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` + + // The user name from the identity provider of the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartProductSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartProductSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StartProductSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StartProductSubscriptionInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.Product == nil { + invalidParams.Add(request.NewErrParamRequired("Product")) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *StartProductSubscriptionInput) SetDomain(v string) *StartProductSubscriptionInput { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *StartProductSubscriptionInput) SetIdentityProvider(v *IdentityProvider) *StartProductSubscriptionInput { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *StartProductSubscriptionInput) SetProduct(v string) *StartProductSubscriptionInput { + s.Product = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *StartProductSubscriptionInput) SetUsername(v string) *StartProductSubscriptionInput { + s.Username = &v + return s +} + +type StartProductSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the start product subscription operation. + // + // ProductUserSummary is a required field + ProductUserSummary *ProductUserSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartProductSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StartProductSubscriptionOutput) GoString() string { + return s.String() +} + +// SetProductUserSummary sets the ProductUserSummary field's value. +func (s *StartProductSubscriptionOutput) SetProductUserSummary(v *ProductUserSummary) *StartProductSubscriptionOutput { + s.ProductUserSummary = v + return s +} + +type StopProductSubscriptionInput struct { + _ struct{} `type:"structure"` + + // The domain name of the user. + Domain *string `type:"string"` + + // An object that specifies details for the identity provider. + // + // IdentityProvider is a required field + IdentityProvider *IdentityProvider `type:"structure" required:"true"` + + // The name of the user-based subscription product. + // + // Product is a required field + Product *string `type:"string" required:"true"` + + // The user name from the identity provider for the user. + // + // Username is a required field + Username *string `type:"string" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopProductSubscriptionInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopProductSubscriptionInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *StopProductSubscriptionInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "StopProductSubscriptionInput"} + if s.IdentityProvider == nil { + invalidParams.Add(request.NewErrParamRequired("IdentityProvider")) + } + if s.Product == nil { + invalidParams.Add(request.NewErrParamRequired("Product")) + } + if s.Username == nil { + invalidParams.Add(request.NewErrParamRequired("Username")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetDomain sets the Domain field's value. +func (s *StopProductSubscriptionInput) SetDomain(v string) *StopProductSubscriptionInput { + s.Domain = &v + return s +} + +// SetIdentityProvider sets the IdentityProvider field's value. +func (s *StopProductSubscriptionInput) SetIdentityProvider(v *IdentityProvider) *StopProductSubscriptionInput { + s.IdentityProvider = v + return s +} + +// SetProduct sets the Product field's value. +func (s *StopProductSubscriptionInput) SetProduct(v string) *StopProductSubscriptionInput { + s.Product = &v + return s +} + +// SetUsername sets the Username field's value. +func (s *StopProductSubscriptionInput) SetUsername(v string) *StopProductSubscriptionInput { + s.Username = &v + return s +} + +type StopProductSubscriptionOutput struct { + _ struct{} `type:"structure"` + + // Metadata that describes the start product subscription operation. + // + // ProductUserSummary is a required field + ProductUserSummary *ProductUserSummary `type:"structure" required:"true"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopProductSubscriptionOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s StopProductSubscriptionOutput) GoString() string { + return s.String() +} + +// SetProductUserSummary sets the ProductUserSummary field's value. +func (s *StopProductSubscriptionOutput) SetProductUserSummary(v *ProductUserSummary) *StopProductSubscriptionOutput { + s.ProductUserSummary = v + return s +} + +// The request was denied because of request throttling. Retry the request. +type ThrottlingException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ThrottlingException) GoString() string { + return s.String() +} + +func newErrorThrottlingException(v protocol.ResponseMetadata) error { + return &ThrottlingException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ThrottlingException) Code() string { + return "ThrottlingException" +} + +// Message returns the exception's message. +func (s *ThrottlingException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ThrottlingException) OrigErr() error { + return nil +} + +func (s *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ThrottlingException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ThrottlingException) RequestID() string { + return s.RespMetadata.RequestID +} + +// A parameter is not valid. +type ValidationException struct { + _ struct{} `type:"structure"` + RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` + + Message_ *string `locationName:"message" type:"string"` +} + +// String returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation. +// +// API parameter values that are decorated as "sensitive" in the API will not +// be included in the string output. The member name will be present, but the +// value will be replaced with "sensitive". +func (s ValidationException) GoString() string { + return s.String() +} + +func newErrorValidationException(v protocol.ResponseMetadata) error { + return &ValidationException{ + RespMetadata: v, + } +} + +// Code returns the exception type name. +func (s *ValidationException) Code() string { + return "ValidationException" +} + +// Message returns the exception's message. +func (s *ValidationException) Message() string { + if s.Message_ != nil { + return *s.Message_ + } + return "" +} + +// OrigErr always returns nil, satisfies awserr.Error interface. +func (s *ValidationException) OrigErr() error { + return nil +} + +func (s *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", s.Code(), s.Message()) +} + +// Status code returns the HTTP status code for the request's response error. +func (s *ValidationException) StatusCode() int { + return s.RespMetadata.StatusCode +} + +// RequestID returns the service's response RequestID for request. +func (s *ValidationException) RequestID() string { + return s.RespMetadata.RequestID +} diff --git a/service/licensemanagerusersubscriptions/doc.go b/service/licensemanagerusersubscriptions/doc.go new file mode 100644 index 00000000000..a4e5b359279 --- /dev/null +++ b/service/licensemanagerusersubscriptions/doc.go @@ -0,0 +1,29 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package licensemanagerusersubscriptions provides the client and types for making API +// requests to AWS License Manager User Subscriptions. +// +// With License Manager, you can create user-based subscriptions to utilize +// licensed software with a per user subscription fee on Amazon EC2 instances. +// +// See https://docs.aws.amazon.com/goto/WebAPI/license-manager-user-subscriptions-2018-05-10 for more information on this service. +// +// See licensemanagerusersubscriptions package documentation for more information. +// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanagerusersubscriptions/ +// +// Using the Client +// +// To contact AWS License Manager User Subscriptions with the SDK use the New function to create +// a new service client. With that client you can make API requests to the service. +// These clients are safe to use concurrently. +// +// See the SDK's documentation for more information on how to use the SDK. +// https://docs.aws.amazon.com/sdk-for-go/api/ +// +// See aws.Config documentation for more information on configuring SDK clients. +// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config +// +// See the AWS License Manager User Subscriptions client LicenseManagerUserSubscriptions for more +// information on creating client for this service. +// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanagerusersubscriptions/#New +package licensemanagerusersubscriptions diff --git a/service/licensemanagerusersubscriptions/errors.go b/service/licensemanagerusersubscriptions/errors.go new file mode 100644 index 00000000000..0ccd83eebb7 --- /dev/null +++ b/service/licensemanagerusersubscriptions/errors.go @@ -0,0 +1,63 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "github.com/aws/aws-sdk-go/private/protocol" +) + +const ( + + // ErrCodeAccessDeniedException for service response error code + // "AccessDeniedException". + // + // You don't have sufficient access to perform this action. + ErrCodeAccessDeniedException = "AccessDeniedException" + + // ErrCodeConflictException for service response error code + // "ConflictException". + // + // The request couldn't be completed because it conflicted with the current + // state of the resource. + ErrCodeConflictException = "ConflictException" + + // ErrCodeInternalServerException for service response error code + // "InternalServerException". + // + // An exception occurred with the service. + ErrCodeInternalServerException = "InternalServerException" + + // ErrCodeResourceNotFoundException for service response error code + // "ResourceNotFoundException". + // + // The resource couldn't be found. + ErrCodeResourceNotFoundException = "ResourceNotFoundException" + + // ErrCodeServiceQuotaExceededException for service response error code + // "ServiceQuotaExceededException". + // + // The request failed because a service quota is exceeded. + ErrCodeServiceQuotaExceededException = "ServiceQuotaExceededException" + + // ErrCodeThrottlingException for service response error code + // "ThrottlingException". + // + // The request was denied because of request throttling. Retry the request. + ErrCodeThrottlingException = "ThrottlingException" + + // ErrCodeValidationException for service response error code + // "ValidationException". + // + // A parameter is not valid. + ErrCodeValidationException = "ValidationException" +) + +var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ + "AccessDeniedException": newErrorAccessDeniedException, + "ConflictException": newErrorConflictException, + "InternalServerException": newErrorInternalServerException, + "ResourceNotFoundException": newErrorResourceNotFoundException, + "ServiceQuotaExceededException": newErrorServiceQuotaExceededException, + "ThrottlingException": newErrorThrottlingException, + "ValidationException": newErrorValidationException, +} diff --git a/service/licensemanagerusersubscriptions/licensemanagerusersubscriptionsiface/interface.go b/service/licensemanagerusersubscriptions/licensemanagerusersubscriptionsiface/interface.go new file mode 100644 index 00000000000..4b8a493b9d3 --- /dev/null +++ b/service/licensemanagerusersubscriptions/licensemanagerusersubscriptionsiface/interface.go @@ -0,0 +1,116 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +// Package licensemanagerusersubscriptionsiface provides an interface to enable mocking the AWS License Manager User Subscriptions service client +// for testing your code. +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. +package licensemanagerusersubscriptionsiface + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/service/licensemanagerusersubscriptions" +) + +// LicenseManagerUserSubscriptionsAPI provides an interface to enable mocking the +// licensemanagerusersubscriptions.LicenseManagerUserSubscriptions service client's API operation, +// paginators, and waiters. This make unit testing your code that calls out +// to the SDK's service client's calls easier. +// +// The best way to use this interface is so the SDK's service client's calls +// can be stubbed out for unit testing your code with the SDK without needing +// to inject custom request handlers into the SDK's request pipeline. +// +// // myFunc uses an SDK service client to make a request to +// // AWS License Manager User Subscriptions. +// func myFunc(svc licensemanagerusersubscriptionsiface.LicenseManagerUserSubscriptionsAPI) bool { +// // Make svc.AssociateUser request +// } +// +// func main() { +// sess := session.New() +// svc := licensemanagerusersubscriptions.New(sess) +// +// myFunc(svc) +// } +// +// In your _test.go file: +// +// // Define a mock struct to be used in your unit tests of myFunc. +// type mockLicenseManagerUserSubscriptionsClient struct { +// licensemanagerusersubscriptionsiface.LicenseManagerUserSubscriptionsAPI +// } +// func (m *mockLicenseManagerUserSubscriptionsClient) AssociateUser(input *licensemanagerusersubscriptions.AssociateUserInput) (*licensemanagerusersubscriptions.AssociateUserOutput, error) { +// // mock response/functionality +// } +// +// func TestMyFunc(t *testing.T) { +// // Setup Test +// mockSvc := &mockLicenseManagerUserSubscriptionsClient{} +// +// myfunc(mockSvc) +// +// // Verify myFunc's functionality +// } +// +// It is important to note that this interface will have breaking changes +// when the service model is updated and adds new API operations, paginators, +// and waiters. Its suggested to use the pattern above for testing, or using +// tooling to generate mocks to satisfy the interfaces. +type LicenseManagerUserSubscriptionsAPI interface { + AssociateUser(*licensemanagerusersubscriptions.AssociateUserInput) (*licensemanagerusersubscriptions.AssociateUserOutput, error) + AssociateUserWithContext(aws.Context, *licensemanagerusersubscriptions.AssociateUserInput, ...request.Option) (*licensemanagerusersubscriptions.AssociateUserOutput, error) + AssociateUserRequest(*licensemanagerusersubscriptions.AssociateUserInput) (*request.Request, *licensemanagerusersubscriptions.AssociateUserOutput) + + DeregisterIdentityProvider(*licensemanagerusersubscriptions.DeregisterIdentityProviderInput) (*licensemanagerusersubscriptions.DeregisterIdentityProviderOutput, error) + DeregisterIdentityProviderWithContext(aws.Context, *licensemanagerusersubscriptions.DeregisterIdentityProviderInput, ...request.Option) (*licensemanagerusersubscriptions.DeregisterIdentityProviderOutput, error) + DeregisterIdentityProviderRequest(*licensemanagerusersubscriptions.DeregisterIdentityProviderInput) (*request.Request, *licensemanagerusersubscriptions.DeregisterIdentityProviderOutput) + + DisassociateUser(*licensemanagerusersubscriptions.DisassociateUserInput) (*licensemanagerusersubscriptions.DisassociateUserOutput, error) + DisassociateUserWithContext(aws.Context, *licensemanagerusersubscriptions.DisassociateUserInput, ...request.Option) (*licensemanagerusersubscriptions.DisassociateUserOutput, error) + DisassociateUserRequest(*licensemanagerusersubscriptions.DisassociateUserInput) (*request.Request, *licensemanagerusersubscriptions.DisassociateUserOutput) + + ListIdentityProviders(*licensemanagerusersubscriptions.ListIdentityProvidersInput) (*licensemanagerusersubscriptions.ListIdentityProvidersOutput, error) + ListIdentityProvidersWithContext(aws.Context, *licensemanagerusersubscriptions.ListIdentityProvidersInput, ...request.Option) (*licensemanagerusersubscriptions.ListIdentityProvidersOutput, error) + ListIdentityProvidersRequest(*licensemanagerusersubscriptions.ListIdentityProvidersInput) (*request.Request, *licensemanagerusersubscriptions.ListIdentityProvidersOutput) + + ListIdentityProvidersPages(*licensemanagerusersubscriptions.ListIdentityProvidersInput, func(*licensemanagerusersubscriptions.ListIdentityProvidersOutput, bool) bool) error + ListIdentityProvidersPagesWithContext(aws.Context, *licensemanagerusersubscriptions.ListIdentityProvidersInput, func(*licensemanagerusersubscriptions.ListIdentityProvidersOutput, bool) bool, ...request.Option) error + + ListInstances(*licensemanagerusersubscriptions.ListInstancesInput) (*licensemanagerusersubscriptions.ListInstancesOutput, error) + ListInstancesWithContext(aws.Context, *licensemanagerusersubscriptions.ListInstancesInput, ...request.Option) (*licensemanagerusersubscriptions.ListInstancesOutput, error) + ListInstancesRequest(*licensemanagerusersubscriptions.ListInstancesInput) (*request.Request, *licensemanagerusersubscriptions.ListInstancesOutput) + + ListInstancesPages(*licensemanagerusersubscriptions.ListInstancesInput, func(*licensemanagerusersubscriptions.ListInstancesOutput, bool) bool) error + ListInstancesPagesWithContext(aws.Context, *licensemanagerusersubscriptions.ListInstancesInput, func(*licensemanagerusersubscriptions.ListInstancesOutput, bool) bool, ...request.Option) error + + ListProductSubscriptions(*licensemanagerusersubscriptions.ListProductSubscriptionsInput) (*licensemanagerusersubscriptions.ListProductSubscriptionsOutput, error) + ListProductSubscriptionsWithContext(aws.Context, *licensemanagerusersubscriptions.ListProductSubscriptionsInput, ...request.Option) (*licensemanagerusersubscriptions.ListProductSubscriptionsOutput, error) + ListProductSubscriptionsRequest(*licensemanagerusersubscriptions.ListProductSubscriptionsInput) (*request.Request, *licensemanagerusersubscriptions.ListProductSubscriptionsOutput) + + ListProductSubscriptionsPages(*licensemanagerusersubscriptions.ListProductSubscriptionsInput, func(*licensemanagerusersubscriptions.ListProductSubscriptionsOutput, bool) bool) error + ListProductSubscriptionsPagesWithContext(aws.Context, *licensemanagerusersubscriptions.ListProductSubscriptionsInput, func(*licensemanagerusersubscriptions.ListProductSubscriptionsOutput, bool) bool, ...request.Option) error + + ListUserAssociations(*licensemanagerusersubscriptions.ListUserAssociationsInput) (*licensemanagerusersubscriptions.ListUserAssociationsOutput, error) + ListUserAssociationsWithContext(aws.Context, *licensemanagerusersubscriptions.ListUserAssociationsInput, ...request.Option) (*licensemanagerusersubscriptions.ListUserAssociationsOutput, error) + ListUserAssociationsRequest(*licensemanagerusersubscriptions.ListUserAssociationsInput) (*request.Request, *licensemanagerusersubscriptions.ListUserAssociationsOutput) + + ListUserAssociationsPages(*licensemanagerusersubscriptions.ListUserAssociationsInput, func(*licensemanagerusersubscriptions.ListUserAssociationsOutput, bool) bool) error + ListUserAssociationsPagesWithContext(aws.Context, *licensemanagerusersubscriptions.ListUserAssociationsInput, func(*licensemanagerusersubscriptions.ListUserAssociationsOutput, bool) bool, ...request.Option) error + + RegisterIdentityProvider(*licensemanagerusersubscriptions.RegisterIdentityProviderInput) (*licensemanagerusersubscriptions.RegisterIdentityProviderOutput, error) + RegisterIdentityProviderWithContext(aws.Context, *licensemanagerusersubscriptions.RegisterIdentityProviderInput, ...request.Option) (*licensemanagerusersubscriptions.RegisterIdentityProviderOutput, error) + RegisterIdentityProviderRequest(*licensemanagerusersubscriptions.RegisterIdentityProviderInput) (*request.Request, *licensemanagerusersubscriptions.RegisterIdentityProviderOutput) + + StartProductSubscription(*licensemanagerusersubscriptions.StartProductSubscriptionInput) (*licensemanagerusersubscriptions.StartProductSubscriptionOutput, error) + StartProductSubscriptionWithContext(aws.Context, *licensemanagerusersubscriptions.StartProductSubscriptionInput, ...request.Option) (*licensemanagerusersubscriptions.StartProductSubscriptionOutput, error) + StartProductSubscriptionRequest(*licensemanagerusersubscriptions.StartProductSubscriptionInput) (*request.Request, *licensemanagerusersubscriptions.StartProductSubscriptionOutput) + + StopProductSubscription(*licensemanagerusersubscriptions.StopProductSubscriptionInput) (*licensemanagerusersubscriptions.StopProductSubscriptionOutput, error) + StopProductSubscriptionWithContext(aws.Context, *licensemanagerusersubscriptions.StopProductSubscriptionInput, ...request.Option) (*licensemanagerusersubscriptions.StopProductSubscriptionOutput, error) + StopProductSubscriptionRequest(*licensemanagerusersubscriptions.StopProductSubscriptionInput) (*request.Request, *licensemanagerusersubscriptions.StopProductSubscriptionOutput) +} + +var _ LicenseManagerUserSubscriptionsAPI = (*licensemanagerusersubscriptions.LicenseManagerUserSubscriptions)(nil) diff --git a/service/licensemanagerusersubscriptions/service.go b/service/licensemanagerusersubscriptions/service.go new file mode 100644 index 00000000000..70face9989b --- /dev/null +++ b/service/licensemanagerusersubscriptions/service.go @@ -0,0 +1,105 @@ +// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. + +package licensemanagerusersubscriptions + +import ( + "github.com/aws/aws-sdk-go/aws" + "github.com/aws/aws-sdk-go/aws/client" + "github.com/aws/aws-sdk-go/aws/client/metadata" + "github.com/aws/aws-sdk-go/aws/request" + "github.com/aws/aws-sdk-go/aws/signer/v4" + "github.com/aws/aws-sdk-go/private/protocol" + "github.com/aws/aws-sdk-go/private/protocol/restjson" +) + +// LicenseManagerUserSubscriptions provides the API operation methods for making requests to +// AWS License Manager User Subscriptions. See this package's package overview docs +// for details on the service. +// +// LicenseManagerUserSubscriptions methods are safe to use concurrently. It is not safe to +// modify mutate any of the struct's properties though. +type LicenseManagerUserSubscriptions struct { + *client.Client +} + +// Used for custom client initialization logic +var initClient func(*client.Client) + +// Used for custom request initialization logic +var initRequest func(*request.Request) + +// Service information constants +const ( + ServiceName = "License Manager User Subscriptions" // Name of service. + EndpointsID = "license-manager-user-subscriptions" // ID to lookup a service endpoint with. + ServiceID = "License Manager User Subscriptions" // ServiceID is a unique identifier of a specific service. +) + +// New creates a new instance of the LicenseManagerUserSubscriptions client with a session. +// If additional configuration is needed for the client instance use the optional +// aws.Config parameter to add your extra config. +// +// Example: +// mySession := session.Must(session.NewSession()) +// +// // Create a LicenseManagerUserSubscriptions client from just a session. +// svc := licensemanagerusersubscriptions.New(mySession) +// +// // Create a LicenseManagerUserSubscriptions client with additional configuration +// svc := licensemanagerusersubscriptions.New(mySession, aws.NewConfig().WithRegion("us-west-2")) +func New(p client.ConfigProvider, cfgs ...*aws.Config) *LicenseManagerUserSubscriptions { + c := p.ClientConfig(EndpointsID, cfgs...) + if c.SigningNameDerived || len(c.SigningName) == 0 { + c.SigningName = "license-manager-user-subscriptions" + } + return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) +} + +// newClient creates, initializes and returns a new service client instance. +func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *LicenseManagerUserSubscriptions { + svc := &LicenseManagerUserSubscriptions{ + Client: client.New( + cfg, + metadata.ClientInfo{ + ServiceName: ServiceName, + ServiceID: ServiceID, + SigningName: signingName, + SigningRegion: signingRegion, + PartitionID: partitionID, + Endpoint: endpoint, + APIVersion: "2018-05-10", + ResolvedRegion: resolvedRegion, + }, + handlers, + ), + } + + // Handlers + svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) + svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) + svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) + svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) + svc.Handlers.UnmarshalError.PushBackNamed( + protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), + ) + + // Run custom client initialization if present + if initClient != nil { + initClient(svc.Client) + } + + return svc +} + +// newRequest creates a new request for a LicenseManagerUserSubscriptions operation and runs any +// custom request initialization. +func (c *LicenseManagerUserSubscriptions) newRequest(op *request.Operation, params, data interface{}) *request.Request { + req := c.NewRequest(op, params, data) + + // Run custom request initialization if present + if initRequest != nil { + initRequest(req) + } + + return req +} diff --git a/service/personalize/api.go b/service/personalize/api.go index ef1700512db..40998b2e30b 100644 --- a/service/personalize/api.go +++ b/service/personalize/api.go @@ -768,8 +768,10 @@ func (c *Personalize) CreateDatasetImportJobRequest(input *CreateDatasetImportJo // to your Amazon S3 bucket, see Giving Amazon Personalize Access to Amazon // S3 Resources (https://docs.aws.amazon.com/personalize/latest/dg/granting-personalize-s3-access.html). // -// The dataset import job replaces any existing data in the dataset that you -// imported in bulk. +// By default, a dataset import job replaces any existing data in the dataset +// that you imported in bulk. To add new records without replacing existing +// data, specify INCREMENTAL for the import mode in the CreateDatasetImportJob +// operation. // // Status // @@ -8712,6 +8714,18 @@ type CreateDatasetImportJobInput struct { // DatasetArn is a required field DatasetArn *string `locationName:"datasetArn" type:"string" required:"true"` + // Specify how to add the new records to an existing dataset. The default import + // mode is FULL. If you haven't imported bulk records into the dataset previously, + // you can only specify FULL. + // + // * Specify FULL to overwrite all existing bulk data in your dataset. Data + // you imported individually is not replaced. + // + // * Specify INCREMENTAL to append the new records to the existing data in + // your dataset. Amazon Personalize replaces any record with the same ID + // with the new one. + ImportMode *string `locationName:"importMode" type:"string" enum:"ImportMode"` + // The name for the dataset import job. // // JobName is a required field @@ -8793,6 +8807,12 @@ func (s *CreateDatasetImportJobInput) SetDatasetArn(v string) *CreateDatasetImpo return s } +// SetImportMode sets the ImportMode field's value. +func (s *CreateDatasetImportJobInput) SetImportMode(v string) *CreateDatasetImportJobInput { + s.ImportMode = &v + return s +} + // SetJobName sets the JobName field's value. func (s *CreateDatasetImportJobInput) SetJobName(v string) *CreateDatasetImportJobInput { s.JobName = &v @@ -10458,6 +10478,9 @@ type DatasetImportJob struct { // If a dataset import job fails, provides the reason why. FailureReason *string `locationName:"failureReason" type:"string"` + // The import mode used by the dataset import job to import new records. + ImportMode *string `locationName:"importMode" type:"string" enum:"ImportMode"` + // The name of the import job. JobName *string `locationName:"jobName" min:"1" type:"string"` @@ -10524,6 +10547,12 @@ func (s *DatasetImportJob) SetFailureReason(v string) *DatasetImportJob { return s } +// SetImportMode sets the ImportMode field's value. +func (s *DatasetImportJob) SetImportMode(v string) *DatasetImportJob { + s.ImportMode = &v + return s +} + // SetJobName sets the JobName field's value. func (s *DatasetImportJob) SetJobName(v string) *DatasetImportJob { s.JobName = &v @@ -10563,6 +10592,10 @@ type DatasetImportJobSummary struct { // If a dataset import job fails, the reason behind the failure. FailureReason *string `locationName:"failureReason" type:"string"` + // The import mode the dataset import job used to update the data in the dataset. + // For more information see Updating existing bulk data (https://docs.aws.amazon.com/personalize/latest/dg/updating-existing-bulk-data.html). + ImportMode *string `locationName:"importMode" type:"string" enum:"ImportMode"` + // The name of the dataset import job. JobName *string `locationName:"jobName" min:"1" type:"string"` @@ -10614,6 +10647,12 @@ func (s *DatasetImportJobSummary) SetFailureReason(v string) *DatasetImportJobSu return s } +// SetImportMode sets the ImportMode field's value. +func (s *DatasetImportJobSummary) SetImportMode(v string) *DatasetImportJobSummary { + s.ImportMode = &v + return s +} + // SetJobName sets the JobName field's value. func (s *DatasetImportJobSummary) SetJobName(v string) *DatasetImportJobSummary { s.JobName = &v @@ -17782,6 +17821,22 @@ func Domain_Values() []string { } } +const ( + // ImportModeFull is a ImportMode enum value + ImportModeFull = "FULL" + + // ImportModeIncremental is a ImportMode enum value + ImportModeIncremental = "INCREMENTAL" +) + +// ImportMode_Values returns all elements of the ImportMode enum +func ImportMode_Values() []string { + return []string{ + ImportModeFull, + ImportModeIncremental, + } +} + const ( // IngestionModeBulk is a IngestionMode enum value IngestionModeBulk = "BULK"