mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-31 04:30:44 +00:00
Update Go AWS SDK to the latest version
This commit is contained in:
committed by
Andrey Smirnov
parent
d08be990ef
commit
94a72b23ff
+3443
File diff suppressed because it is too large
Load Diff
+35
@@ -0,0 +1,35 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package licensemanager provides the client and types for making API
|
||||
// requests to AWS License Manager.
|
||||
//
|
||||
// This is the AWS License Manager API Reference. It provides descriptions,
|
||||
// syntax, and usage examples for each of the actions and data types for License
|
||||
// Manager. The topic for each action shows the Query API request parameters
|
||||
// and the XML response. You can also view the XML request elements in the WSDL.
|
||||
//
|
||||
// Alternatively, you can use one of the AWS SDKs to access an API that's tailored
|
||||
// to the programming language or platform that you're using. For more information,
|
||||
// see AWS SDKs (http://aws.amazon.com/tools/#SDKs).
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/license-manager-2018-08-01 for more information on this service.
|
||||
//
|
||||
// See licensemanager package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To contact AWS License Manager 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 client LicenseManager for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/licensemanager/#New
|
||||
package licensemanager
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package licensemanager
|
||||
|
||||
const (
|
||||
|
||||
// ErrCodeAccessDeniedException for service response error code
|
||||
// "AccessDeniedException".
|
||||
//
|
||||
// Access to resource denied.
|
||||
ErrCodeAccessDeniedException = "AccessDeniedException"
|
||||
|
||||
// ErrCodeAuthorizationException for service response error code
|
||||
// "AuthorizationException".
|
||||
//
|
||||
// The AWS user account does not have permission to perform the action. Check
|
||||
// the IAM policy associated with this account.
|
||||
ErrCodeAuthorizationException = "AuthorizationException"
|
||||
|
||||
// ErrCodeFailedDependencyException for service response error code
|
||||
// "FailedDependencyException".
|
||||
//
|
||||
// A dependency required to run the API is missing.
|
||||
ErrCodeFailedDependencyException = "FailedDependencyException"
|
||||
|
||||
// ErrCodeFilterLimitExceededException for service response error code
|
||||
// "FilterLimitExceededException".
|
||||
//
|
||||
// The request uses too many filters or too many filter values.
|
||||
ErrCodeFilterLimitExceededException = "FilterLimitExceededException"
|
||||
|
||||
// ErrCodeInvalidParameterValueException for service response error code
|
||||
// "InvalidParameterValueException".
|
||||
//
|
||||
// One or more parameter values are not valid.
|
||||
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
|
||||
|
||||
// ErrCodeInvalidResourceStateException for service response error code
|
||||
// "InvalidResourceStateException".
|
||||
//
|
||||
// License Manager cannot allocate a license to a resource because of its state.
|
||||
//
|
||||
// For example, you cannot allocate a license to an instance in the process
|
||||
// of shutting down.
|
||||
ErrCodeInvalidResourceStateException = "InvalidResourceStateException"
|
||||
|
||||
// ErrCodeLicenseUsageException for service response error code
|
||||
// "LicenseUsageException".
|
||||
//
|
||||
// You do not have enough licenses available to support a new resource launch.
|
||||
ErrCodeLicenseUsageException = "LicenseUsageException"
|
||||
|
||||
// ErrCodeRateLimitExceededException for service response error code
|
||||
// "RateLimitExceededException".
|
||||
//
|
||||
// Too many requests have been submitted. Try again after a brief wait.
|
||||
ErrCodeRateLimitExceededException = "RateLimitExceededException"
|
||||
|
||||
// ErrCodeResourceLimitExceededException for service response error code
|
||||
// "ResourceLimitExceededException".
|
||||
//
|
||||
// Your resource limits have been exceeded.
|
||||
ErrCodeResourceLimitExceededException = "ResourceLimitExceededException"
|
||||
|
||||
// ErrCodeServerInternalException for service response error code
|
||||
// "ServerInternalException".
|
||||
//
|
||||
// The server experienced an internal error. Try again.
|
||||
ErrCodeServerInternalException = "ServerInternalException"
|
||||
)
|
||||
Generated
Vendored
+124
@@ -0,0 +1,124 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package licensemanageriface provides an interface to enable mocking the AWS License Manager 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 licensemanageriface
|
||||
|
||||
import (
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
"github.com/aws/aws-sdk-go/aws/request"
|
||||
"github.com/aws/aws-sdk-go/service/licensemanager"
|
||||
)
|
||||
|
||||
// LicenseManagerAPI provides an interface to enable mocking the
|
||||
// licensemanager.LicenseManager 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.
|
||||
// func myFunc(svc licensemanageriface.LicenseManagerAPI) bool {
|
||||
// // Make svc.CreateLicenseConfiguration request
|
||||
// }
|
||||
//
|
||||
// func main() {
|
||||
// sess := session.New()
|
||||
// svc := licensemanager.New(sess)
|
||||
//
|
||||
// myFunc(svc)
|
||||
// }
|
||||
//
|
||||
// In your _test.go file:
|
||||
//
|
||||
// // Define a mock struct to be used in your unit tests of myFunc.
|
||||
// type mockLicenseManagerClient struct {
|
||||
// licensemanageriface.LicenseManagerAPI
|
||||
// }
|
||||
// func (m *mockLicenseManagerClient) CreateLicenseConfiguration(input *licensemanager.CreateLicenseConfigurationInput) (*licensemanager.CreateLicenseConfigurationOutput, error) {
|
||||
// // mock response/functionality
|
||||
// }
|
||||
//
|
||||
// func TestMyFunc(t *testing.T) {
|
||||
// // Setup Test
|
||||
// mockSvc := &mockLicenseManagerClient{}
|
||||
//
|
||||
// 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 LicenseManagerAPI interface {
|
||||
CreateLicenseConfiguration(*licensemanager.CreateLicenseConfigurationInput) (*licensemanager.CreateLicenseConfigurationOutput, error)
|
||||
CreateLicenseConfigurationWithContext(aws.Context, *licensemanager.CreateLicenseConfigurationInput, ...request.Option) (*licensemanager.CreateLicenseConfigurationOutput, error)
|
||||
CreateLicenseConfigurationRequest(*licensemanager.CreateLicenseConfigurationInput) (*request.Request, *licensemanager.CreateLicenseConfigurationOutput)
|
||||
|
||||
DeleteLicenseConfiguration(*licensemanager.DeleteLicenseConfigurationInput) (*licensemanager.DeleteLicenseConfigurationOutput, error)
|
||||
DeleteLicenseConfigurationWithContext(aws.Context, *licensemanager.DeleteLicenseConfigurationInput, ...request.Option) (*licensemanager.DeleteLicenseConfigurationOutput, error)
|
||||
DeleteLicenseConfigurationRequest(*licensemanager.DeleteLicenseConfigurationInput) (*request.Request, *licensemanager.DeleteLicenseConfigurationOutput)
|
||||
|
||||
GetLicenseConfiguration(*licensemanager.GetLicenseConfigurationInput) (*licensemanager.GetLicenseConfigurationOutput, error)
|
||||
GetLicenseConfigurationWithContext(aws.Context, *licensemanager.GetLicenseConfigurationInput, ...request.Option) (*licensemanager.GetLicenseConfigurationOutput, error)
|
||||
GetLicenseConfigurationRequest(*licensemanager.GetLicenseConfigurationInput) (*request.Request, *licensemanager.GetLicenseConfigurationOutput)
|
||||
|
||||
GetServiceSettings(*licensemanager.GetServiceSettingsInput) (*licensemanager.GetServiceSettingsOutput, error)
|
||||
GetServiceSettingsWithContext(aws.Context, *licensemanager.GetServiceSettingsInput, ...request.Option) (*licensemanager.GetServiceSettingsOutput, error)
|
||||
GetServiceSettingsRequest(*licensemanager.GetServiceSettingsInput) (*request.Request, *licensemanager.GetServiceSettingsOutput)
|
||||
|
||||
ListAssociationsForLicenseConfiguration(*licensemanager.ListAssociationsForLicenseConfigurationInput) (*licensemanager.ListAssociationsForLicenseConfigurationOutput, error)
|
||||
ListAssociationsForLicenseConfigurationWithContext(aws.Context, *licensemanager.ListAssociationsForLicenseConfigurationInput, ...request.Option) (*licensemanager.ListAssociationsForLicenseConfigurationOutput, error)
|
||||
ListAssociationsForLicenseConfigurationRequest(*licensemanager.ListAssociationsForLicenseConfigurationInput) (*request.Request, *licensemanager.ListAssociationsForLicenseConfigurationOutput)
|
||||
|
||||
ListLicenseConfigurations(*licensemanager.ListLicenseConfigurationsInput) (*licensemanager.ListLicenseConfigurationsOutput, error)
|
||||
ListLicenseConfigurationsWithContext(aws.Context, *licensemanager.ListLicenseConfigurationsInput, ...request.Option) (*licensemanager.ListLicenseConfigurationsOutput, error)
|
||||
ListLicenseConfigurationsRequest(*licensemanager.ListLicenseConfigurationsInput) (*request.Request, *licensemanager.ListLicenseConfigurationsOutput)
|
||||
|
||||
ListLicenseSpecificationsForResource(*licensemanager.ListLicenseSpecificationsForResourceInput) (*licensemanager.ListLicenseSpecificationsForResourceOutput, error)
|
||||
ListLicenseSpecificationsForResourceWithContext(aws.Context, *licensemanager.ListLicenseSpecificationsForResourceInput, ...request.Option) (*licensemanager.ListLicenseSpecificationsForResourceOutput, error)
|
||||
ListLicenseSpecificationsForResourceRequest(*licensemanager.ListLicenseSpecificationsForResourceInput) (*request.Request, *licensemanager.ListLicenseSpecificationsForResourceOutput)
|
||||
|
||||
ListResourceInventory(*licensemanager.ListResourceInventoryInput) (*licensemanager.ListResourceInventoryOutput, error)
|
||||
ListResourceInventoryWithContext(aws.Context, *licensemanager.ListResourceInventoryInput, ...request.Option) (*licensemanager.ListResourceInventoryOutput, error)
|
||||
ListResourceInventoryRequest(*licensemanager.ListResourceInventoryInput) (*request.Request, *licensemanager.ListResourceInventoryOutput)
|
||||
|
||||
ListTagsForResource(*licensemanager.ListTagsForResourceInput) (*licensemanager.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceWithContext(aws.Context, *licensemanager.ListTagsForResourceInput, ...request.Option) (*licensemanager.ListTagsForResourceOutput, error)
|
||||
ListTagsForResourceRequest(*licensemanager.ListTagsForResourceInput) (*request.Request, *licensemanager.ListTagsForResourceOutput)
|
||||
|
||||
ListUsageForLicenseConfiguration(*licensemanager.ListUsageForLicenseConfigurationInput) (*licensemanager.ListUsageForLicenseConfigurationOutput, error)
|
||||
ListUsageForLicenseConfigurationWithContext(aws.Context, *licensemanager.ListUsageForLicenseConfigurationInput, ...request.Option) (*licensemanager.ListUsageForLicenseConfigurationOutput, error)
|
||||
ListUsageForLicenseConfigurationRequest(*licensemanager.ListUsageForLicenseConfigurationInput) (*request.Request, *licensemanager.ListUsageForLicenseConfigurationOutput)
|
||||
|
||||
TagResource(*licensemanager.TagResourceInput) (*licensemanager.TagResourceOutput, error)
|
||||
TagResourceWithContext(aws.Context, *licensemanager.TagResourceInput, ...request.Option) (*licensemanager.TagResourceOutput, error)
|
||||
TagResourceRequest(*licensemanager.TagResourceInput) (*request.Request, *licensemanager.TagResourceOutput)
|
||||
|
||||
UntagResource(*licensemanager.UntagResourceInput) (*licensemanager.UntagResourceOutput, error)
|
||||
UntagResourceWithContext(aws.Context, *licensemanager.UntagResourceInput, ...request.Option) (*licensemanager.UntagResourceOutput, error)
|
||||
UntagResourceRequest(*licensemanager.UntagResourceInput) (*request.Request, *licensemanager.UntagResourceOutput)
|
||||
|
||||
UpdateLicenseConfiguration(*licensemanager.UpdateLicenseConfigurationInput) (*licensemanager.UpdateLicenseConfigurationOutput, error)
|
||||
UpdateLicenseConfigurationWithContext(aws.Context, *licensemanager.UpdateLicenseConfigurationInput, ...request.Option) (*licensemanager.UpdateLicenseConfigurationOutput, error)
|
||||
UpdateLicenseConfigurationRequest(*licensemanager.UpdateLicenseConfigurationInput) (*request.Request, *licensemanager.UpdateLicenseConfigurationOutput)
|
||||
|
||||
UpdateLicenseSpecificationsForResource(*licensemanager.UpdateLicenseSpecificationsForResourceInput) (*licensemanager.UpdateLicenseSpecificationsForResourceOutput, error)
|
||||
UpdateLicenseSpecificationsForResourceWithContext(aws.Context, *licensemanager.UpdateLicenseSpecificationsForResourceInput, ...request.Option) (*licensemanager.UpdateLicenseSpecificationsForResourceOutput, error)
|
||||
UpdateLicenseSpecificationsForResourceRequest(*licensemanager.UpdateLicenseSpecificationsForResourceInput) (*request.Request, *licensemanager.UpdateLicenseSpecificationsForResourceOutput)
|
||||
|
||||
UpdateServiceSettings(*licensemanager.UpdateServiceSettingsInput) (*licensemanager.UpdateServiceSettingsOutput, error)
|
||||
UpdateServiceSettingsWithContext(aws.Context, *licensemanager.UpdateServiceSettingsInput, ...request.Option) (*licensemanager.UpdateServiceSettingsOutput, error)
|
||||
UpdateServiceSettingsRequest(*licensemanager.UpdateServiceSettingsInput) (*request.Request, *licensemanager.UpdateServiceSettingsOutput)
|
||||
}
|
||||
|
||||
var _ LicenseManagerAPI = (*licensemanager.LicenseManager)(nil)
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package licensemanager
|
||||
|
||||
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/jsonrpc"
|
||||
)
|
||||
|
||||
// LicenseManager provides the API operation methods for making requests to
|
||||
// AWS License Manager. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// LicenseManager methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type LicenseManager 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" // Name of service.
|
||||
EndpointsID = "license-manager" // ID to lookup a service endpoint with.
|
||||
ServiceID = "License Manager" // ServiceID is a unique identifer of a specific service.
|
||||
)
|
||||
|
||||
// New creates a new instance of the LicenseManager 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:
|
||||
// // Create a LicenseManager client from just a session.
|
||||
// svc := licensemanager.New(mySession)
|
||||
//
|
||||
// // Create a LicenseManager client with additional configuration
|
||||
// svc := licensemanager.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
|
||||
func New(p client.ConfigProvider, cfgs ...*aws.Config) *LicenseManager {
|
||||
c := p.ClientConfig(EndpointsID, cfgs...)
|
||||
return newClient(*c.Config, c.Handlers, c.Endpoint, c.SigningRegion, c.SigningName)
|
||||
}
|
||||
|
||||
// newClient creates, initializes and returns a new service client instance.
|
||||
func newClient(cfg aws.Config, handlers request.Handlers, endpoint, signingRegion, signingName string) *LicenseManager {
|
||||
svc := &LicenseManager{
|
||||
Client: client.New(
|
||||
cfg,
|
||||
metadata.ClientInfo{
|
||||
ServiceName: ServiceName,
|
||||
ServiceID: ServiceID,
|
||||
SigningName: signingName,
|
||||
SigningRegion: signingRegion,
|
||||
Endpoint: endpoint,
|
||||
APIVersion: "2018-08-01",
|
||||
JSONVersion: "1.1",
|
||||
TargetPrefix: "AWSLicenseManager",
|
||||
},
|
||||
handlers,
|
||||
),
|
||||
}
|
||||
|
||||
// Handlers
|
||||
svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler)
|
||||
svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler)
|
||||
svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler)
|
||||
svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler)
|
||||
svc.Handlers.UnmarshalError.PushBackNamed(jsonrpc.UnmarshalErrorHandler)
|
||||
|
||||
// Run custom client initialization if present
|
||||
if initClient != nil {
|
||||
initClient(svc.Client)
|
||||
}
|
||||
|
||||
return svc
|
||||
}
|
||||
|
||||
// newRequest creates a new request for a LicenseManager operation and runs any
|
||||
// custom request initialization.
|
||||
func (c *LicenseManager) 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
|
||||
}
|
||||
Reference in New Issue
Block a user