Conver to regular Go vendor + dep tool

This commit is contained in:
Andrey Smirnov
2017-03-22 17:38:32 +03:00
parent 070347295e
commit c6c1012330
3260 changed files with 1742550 additions and 72 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,171 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package configserviceiface provides an interface to enable mocking the AWS Config 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 configserviceiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/configservice"
)
// ConfigServiceAPI provides an interface to enable mocking the
// configservice.ConfigService 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 the SDK's request pipeline.
//
// // myFunc uses an SDK service client to make a request to
// // AWS Config.
// func myFunc(svc configserviceiface.ConfigServiceAPI) bool {
// // Make svc.DeleteConfigRule request
// }
//
// func main() {
// sess := session.New()
// svc := configservice.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockConfigServiceClient struct {
// configserviceiface.ConfigServiceAPI
// }
// func (m *mockConfigServiceClient) DeleteConfigRule(input *configservice.DeleteConfigRuleInput) (*configservice.DeleteConfigRuleOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockConfigServiceClient{}
//
// 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 ConfigServiceAPI interface {
DeleteConfigRule(*configservice.DeleteConfigRuleInput) (*configservice.DeleteConfigRuleOutput, error)
DeleteConfigRuleWithContext(aws.Context, *configservice.DeleteConfigRuleInput, ...request.Option) (*configservice.DeleteConfigRuleOutput, error)
DeleteConfigRuleRequest(*configservice.DeleteConfigRuleInput) (*request.Request, *configservice.DeleteConfigRuleOutput)
DeleteConfigurationRecorder(*configservice.DeleteConfigurationRecorderInput) (*configservice.DeleteConfigurationRecorderOutput, error)
DeleteConfigurationRecorderWithContext(aws.Context, *configservice.DeleteConfigurationRecorderInput, ...request.Option) (*configservice.DeleteConfigurationRecorderOutput, error)
DeleteConfigurationRecorderRequest(*configservice.DeleteConfigurationRecorderInput) (*request.Request, *configservice.DeleteConfigurationRecorderOutput)
DeleteDeliveryChannel(*configservice.DeleteDeliveryChannelInput) (*configservice.DeleteDeliveryChannelOutput, error)
DeleteDeliveryChannelWithContext(aws.Context, *configservice.DeleteDeliveryChannelInput, ...request.Option) (*configservice.DeleteDeliveryChannelOutput, error)
DeleteDeliveryChannelRequest(*configservice.DeleteDeliveryChannelInput) (*request.Request, *configservice.DeleteDeliveryChannelOutput)
DeleteEvaluationResults(*configservice.DeleteEvaluationResultsInput) (*configservice.DeleteEvaluationResultsOutput, error)
DeleteEvaluationResultsWithContext(aws.Context, *configservice.DeleteEvaluationResultsInput, ...request.Option) (*configservice.DeleteEvaluationResultsOutput, error)
DeleteEvaluationResultsRequest(*configservice.DeleteEvaluationResultsInput) (*request.Request, *configservice.DeleteEvaluationResultsOutput)
DeliverConfigSnapshot(*configservice.DeliverConfigSnapshotInput) (*configservice.DeliverConfigSnapshotOutput, error)
DeliverConfigSnapshotWithContext(aws.Context, *configservice.DeliverConfigSnapshotInput, ...request.Option) (*configservice.DeliverConfigSnapshotOutput, error)
DeliverConfigSnapshotRequest(*configservice.DeliverConfigSnapshotInput) (*request.Request, *configservice.DeliverConfigSnapshotOutput)
DescribeComplianceByConfigRule(*configservice.DescribeComplianceByConfigRuleInput) (*configservice.DescribeComplianceByConfigRuleOutput, error)
DescribeComplianceByConfigRuleWithContext(aws.Context, *configservice.DescribeComplianceByConfigRuleInput, ...request.Option) (*configservice.DescribeComplianceByConfigRuleOutput, error)
DescribeComplianceByConfigRuleRequest(*configservice.DescribeComplianceByConfigRuleInput) (*request.Request, *configservice.DescribeComplianceByConfigRuleOutput)
DescribeComplianceByResource(*configservice.DescribeComplianceByResourceInput) (*configservice.DescribeComplianceByResourceOutput, error)
DescribeComplianceByResourceWithContext(aws.Context, *configservice.DescribeComplianceByResourceInput, ...request.Option) (*configservice.DescribeComplianceByResourceOutput, error)
DescribeComplianceByResourceRequest(*configservice.DescribeComplianceByResourceInput) (*request.Request, *configservice.DescribeComplianceByResourceOutput)
DescribeConfigRuleEvaluationStatus(*configservice.DescribeConfigRuleEvaluationStatusInput) (*configservice.DescribeConfigRuleEvaluationStatusOutput, error)
DescribeConfigRuleEvaluationStatusWithContext(aws.Context, *configservice.DescribeConfigRuleEvaluationStatusInput, ...request.Option) (*configservice.DescribeConfigRuleEvaluationStatusOutput, error)
DescribeConfigRuleEvaluationStatusRequest(*configservice.DescribeConfigRuleEvaluationStatusInput) (*request.Request, *configservice.DescribeConfigRuleEvaluationStatusOutput)
DescribeConfigRules(*configservice.DescribeConfigRulesInput) (*configservice.DescribeConfigRulesOutput, error)
DescribeConfigRulesWithContext(aws.Context, *configservice.DescribeConfigRulesInput, ...request.Option) (*configservice.DescribeConfigRulesOutput, error)
DescribeConfigRulesRequest(*configservice.DescribeConfigRulesInput) (*request.Request, *configservice.DescribeConfigRulesOutput)
DescribeConfigurationRecorderStatus(*configservice.DescribeConfigurationRecorderStatusInput) (*configservice.DescribeConfigurationRecorderStatusOutput, error)
DescribeConfigurationRecorderStatusWithContext(aws.Context, *configservice.DescribeConfigurationRecorderStatusInput, ...request.Option) (*configservice.DescribeConfigurationRecorderStatusOutput, error)
DescribeConfigurationRecorderStatusRequest(*configservice.DescribeConfigurationRecorderStatusInput) (*request.Request, *configservice.DescribeConfigurationRecorderStatusOutput)
DescribeConfigurationRecorders(*configservice.DescribeConfigurationRecordersInput) (*configservice.DescribeConfigurationRecordersOutput, error)
DescribeConfigurationRecordersWithContext(aws.Context, *configservice.DescribeConfigurationRecordersInput, ...request.Option) (*configservice.DescribeConfigurationRecordersOutput, error)
DescribeConfigurationRecordersRequest(*configservice.DescribeConfigurationRecordersInput) (*request.Request, *configservice.DescribeConfigurationRecordersOutput)
DescribeDeliveryChannelStatus(*configservice.DescribeDeliveryChannelStatusInput) (*configservice.DescribeDeliveryChannelStatusOutput, error)
DescribeDeliveryChannelStatusWithContext(aws.Context, *configservice.DescribeDeliveryChannelStatusInput, ...request.Option) (*configservice.DescribeDeliveryChannelStatusOutput, error)
DescribeDeliveryChannelStatusRequest(*configservice.DescribeDeliveryChannelStatusInput) (*request.Request, *configservice.DescribeDeliveryChannelStatusOutput)
DescribeDeliveryChannels(*configservice.DescribeDeliveryChannelsInput) (*configservice.DescribeDeliveryChannelsOutput, error)
DescribeDeliveryChannelsWithContext(aws.Context, *configservice.DescribeDeliveryChannelsInput, ...request.Option) (*configservice.DescribeDeliveryChannelsOutput, error)
DescribeDeliveryChannelsRequest(*configservice.DescribeDeliveryChannelsInput) (*request.Request, *configservice.DescribeDeliveryChannelsOutput)
GetComplianceDetailsByConfigRule(*configservice.GetComplianceDetailsByConfigRuleInput) (*configservice.GetComplianceDetailsByConfigRuleOutput, error)
GetComplianceDetailsByConfigRuleWithContext(aws.Context, *configservice.GetComplianceDetailsByConfigRuleInput, ...request.Option) (*configservice.GetComplianceDetailsByConfigRuleOutput, error)
GetComplianceDetailsByConfigRuleRequest(*configservice.GetComplianceDetailsByConfigRuleInput) (*request.Request, *configservice.GetComplianceDetailsByConfigRuleOutput)
GetComplianceDetailsByResource(*configservice.GetComplianceDetailsByResourceInput) (*configservice.GetComplianceDetailsByResourceOutput, error)
GetComplianceDetailsByResourceWithContext(aws.Context, *configservice.GetComplianceDetailsByResourceInput, ...request.Option) (*configservice.GetComplianceDetailsByResourceOutput, error)
GetComplianceDetailsByResourceRequest(*configservice.GetComplianceDetailsByResourceInput) (*request.Request, *configservice.GetComplianceDetailsByResourceOutput)
GetComplianceSummaryByConfigRule(*configservice.GetComplianceSummaryByConfigRuleInput) (*configservice.GetComplianceSummaryByConfigRuleOutput, error)
GetComplianceSummaryByConfigRuleWithContext(aws.Context, *configservice.GetComplianceSummaryByConfigRuleInput, ...request.Option) (*configservice.GetComplianceSummaryByConfigRuleOutput, error)
GetComplianceSummaryByConfigRuleRequest(*configservice.GetComplianceSummaryByConfigRuleInput) (*request.Request, *configservice.GetComplianceSummaryByConfigRuleOutput)
GetComplianceSummaryByResourceType(*configservice.GetComplianceSummaryByResourceTypeInput) (*configservice.GetComplianceSummaryByResourceTypeOutput, error)
GetComplianceSummaryByResourceTypeWithContext(aws.Context, *configservice.GetComplianceSummaryByResourceTypeInput, ...request.Option) (*configservice.GetComplianceSummaryByResourceTypeOutput, error)
GetComplianceSummaryByResourceTypeRequest(*configservice.GetComplianceSummaryByResourceTypeInput) (*request.Request, *configservice.GetComplianceSummaryByResourceTypeOutput)
GetResourceConfigHistory(*configservice.GetResourceConfigHistoryInput) (*configservice.GetResourceConfigHistoryOutput, error)
GetResourceConfigHistoryWithContext(aws.Context, *configservice.GetResourceConfigHistoryInput, ...request.Option) (*configservice.GetResourceConfigHistoryOutput, error)
GetResourceConfigHistoryRequest(*configservice.GetResourceConfigHistoryInput) (*request.Request, *configservice.GetResourceConfigHistoryOutput)
GetResourceConfigHistoryPages(*configservice.GetResourceConfigHistoryInput, func(*configservice.GetResourceConfigHistoryOutput, bool) bool) error
GetResourceConfigHistoryPagesWithContext(aws.Context, *configservice.GetResourceConfigHistoryInput, func(*configservice.GetResourceConfigHistoryOutput, bool) bool, ...request.Option) error
ListDiscoveredResources(*configservice.ListDiscoveredResourcesInput) (*configservice.ListDiscoveredResourcesOutput, error)
ListDiscoveredResourcesWithContext(aws.Context, *configservice.ListDiscoveredResourcesInput, ...request.Option) (*configservice.ListDiscoveredResourcesOutput, error)
ListDiscoveredResourcesRequest(*configservice.ListDiscoveredResourcesInput) (*request.Request, *configservice.ListDiscoveredResourcesOutput)
PutConfigRule(*configservice.PutConfigRuleInput) (*configservice.PutConfigRuleOutput, error)
PutConfigRuleWithContext(aws.Context, *configservice.PutConfigRuleInput, ...request.Option) (*configservice.PutConfigRuleOutput, error)
PutConfigRuleRequest(*configservice.PutConfigRuleInput) (*request.Request, *configservice.PutConfigRuleOutput)
PutConfigurationRecorder(*configservice.PutConfigurationRecorderInput) (*configservice.PutConfigurationRecorderOutput, error)
PutConfigurationRecorderWithContext(aws.Context, *configservice.PutConfigurationRecorderInput, ...request.Option) (*configservice.PutConfigurationRecorderOutput, error)
PutConfigurationRecorderRequest(*configservice.PutConfigurationRecorderInput) (*request.Request, *configservice.PutConfigurationRecorderOutput)
PutDeliveryChannel(*configservice.PutDeliveryChannelInput) (*configservice.PutDeliveryChannelOutput, error)
PutDeliveryChannelWithContext(aws.Context, *configservice.PutDeliveryChannelInput, ...request.Option) (*configservice.PutDeliveryChannelOutput, error)
PutDeliveryChannelRequest(*configservice.PutDeliveryChannelInput) (*request.Request, *configservice.PutDeliveryChannelOutput)
PutEvaluations(*configservice.PutEvaluationsInput) (*configservice.PutEvaluationsOutput, error)
PutEvaluationsWithContext(aws.Context, *configservice.PutEvaluationsInput, ...request.Option) (*configservice.PutEvaluationsOutput, error)
PutEvaluationsRequest(*configservice.PutEvaluationsInput) (*request.Request, *configservice.PutEvaluationsOutput)
StartConfigRulesEvaluation(*configservice.StartConfigRulesEvaluationInput) (*configservice.StartConfigRulesEvaluationOutput, error)
StartConfigRulesEvaluationWithContext(aws.Context, *configservice.StartConfigRulesEvaluationInput, ...request.Option) (*configservice.StartConfigRulesEvaluationOutput, error)
StartConfigRulesEvaluationRequest(*configservice.StartConfigRulesEvaluationInput) (*request.Request, *configservice.StartConfigRulesEvaluationOutput)
StartConfigurationRecorder(*configservice.StartConfigurationRecorderInput) (*configservice.StartConfigurationRecorderOutput, error)
StartConfigurationRecorderWithContext(aws.Context, *configservice.StartConfigurationRecorderInput, ...request.Option) (*configservice.StartConfigurationRecorderOutput, error)
StartConfigurationRecorderRequest(*configservice.StartConfigurationRecorderInput) (*request.Request, *configservice.StartConfigurationRecorderOutput)
StopConfigurationRecorder(*configservice.StopConfigurationRecorderInput) (*configservice.StopConfigurationRecorderOutput, error)
StopConfigurationRecorderWithContext(aws.Context, *configservice.StopConfigurationRecorderInput, ...request.Option) (*configservice.StopConfigurationRecorderOutput, error)
StopConfigurationRecorderRequest(*configservice.StopConfigurationRecorderInput) (*request.Request, *configservice.StopConfigurationRecorderOutput)
}
var _ ConfigServiceAPI = (*configservice.ConfigService)(nil)
+191
View File
@@ -0,0 +1,191 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package configservice
const (
// ErrCodeInsufficientDeliveryPolicyException for service response error code
// "InsufficientDeliveryPolicyException".
//
// Your Amazon S3 bucket policy does not permit AWS Config to write to it.
ErrCodeInsufficientDeliveryPolicyException = "InsufficientDeliveryPolicyException"
// ErrCodeInsufficientPermissionsException for service response error code
// "InsufficientPermissionsException".
//
// Indicates one of the following errors:
//
// * The rule cannot be created because the IAM role assigned to AWS Config
// lacks permissions to perform the config:Put* action.
//
// * The AWS Lambda function cannot be invoked. Check the function ARN, and
// check the function's permissions.
ErrCodeInsufficientPermissionsException = "InsufficientPermissionsException"
// ErrCodeInvalidConfigurationRecorderNameException for service response error code
// "InvalidConfigurationRecorderNameException".
//
// You have provided a configuration recorder name that is not valid.
ErrCodeInvalidConfigurationRecorderNameException = "InvalidConfigurationRecorderNameException"
// ErrCodeInvalidDeliveryChannelNameException for service response error code
// "InvalidDeliveryChannelNameException".
//
// The specified delivery channel name is not valid.
ErrCodeInvalidDeliveryChannelNameException = "InvalidDeliveryChannelNameException"
// ErrCodeInvalidLimitException for service response error code
// "InvalidLimitException".
//
// The specified limit is outside the allowable range.
ErrCodeInvalidLimitException = "InvalidLimitException"
// ErrCodeInvalidNextTokenException for service response error code
// "InvalidNextTokenException".
//
// The specified next token is invalid. Specify the NextToken string that was
// returned in the previous response to get the next page of results.
ErrCodeInvalidNextTokenException = "InvalidNextTokenException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// One or more of the specified parameters are invalid. Verify that your parameters
// are valid and try again.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeInvalidRecordingGroupException for service response error code
// "InvalidRecordingGroupException".
//
// AWS Config throws an exception if the recording group does not contain a
// valid list of resource types. Invalid values could also be incorrectly formatted.
ErrCodeInvalidRecordingGroupException = "InvalidRecordingGroupException"
// ErrCodeInvalidResultTokenException for service response error code
// "InvalidResultTokenException".
//
// The specified ResultToken is invalid.
ErrCodeInvalidResultTokenException = "InvalidResultTokenException"
// ErrCodeInvalidRoleException for service response error code
// "InvalidRoleException".
//
// You have provided a null or empty role ARN.
ErrCodeInvalidRoleException = "InvalidRoleException"
// ErrCodeInvalidS3KeyPrefixException for service response error code
// "InvalidS3KeyPrefixException".
//
// The specified Amazon S3 key prefix is not valid.
ErrCodeInvalidS3KeyPrefixException = "InvalidS3KeyPrefixException"
// ErrCodeInvalidSNSTopicARNException for service response error code
// "InvalidSNSTopicARNException".
//
// The specified Amazon SNS topic does not exist.
ErrCodeInvalidSNSTopicARNException = "InvalidSNSTopicARNException"
// ErrCodeInvalidTimeRangeException for service response error code
// "InvalidTimeRangeException".
//
// The specified time range is not valid. The earlier time is not chronologically
// before the later time.
ErrCodeInvalidTimeRangeException = "InvalidTimeRangeException"
// ErrCodeLastDeliveryChannelDeleteFailedException for service response error code
// "LastDeliveryChannelDeleteFailedException".
//
// You cannot delete the delivery channel you specified because the configuration
// recorder is running.
ErrCodeLastDeliveryChannelDeleteFailedException = "LastDeliveryChannelDeleteFailedException"
// ErrCodeLimitExceededException for service response error code
// "LimitExceededException".
//
// This exception is thrown if an evaluation is in progress or if you call the
// StartConfigRulesEvaluation API more than once per minute.
ErrCodeLimitExceededException = "LimitExceededException"
// ErrCodeMaxNumberOfConfigRulesExceededException for service response error code
// "MaxNumberOfConfigRulesExceededException".
//
// Failed to add the AWS Config rule because the account already contains the
// maximum number of 50 rules. Consider deleting any deactivated rules before
// adding new rules.
ErrCodeMaxNumberOfConfigRulesExceededException = "MaxNumberOfConfigRulesExceededException"
// ErrCodeMaxNumberOfConfigurationRecordersExceededException for service response error code
// "MaxNumberOfConfigurationRecordersExceededException".
//
// You have reached the limit on the number of recorders you can create.
ErrCodeMaxNumberOfConfigurationRecordersExceededException = "MaxNumberOfConfigurationRecordersExceededException"
// ErrCodeMaxNumberOfDeliveryChannelsExceededException for service response error code
// "MaxNumberOfDeliveryChannelsExceededException".
//
// You have reached the limit on the number of delivery channels you can create.
ErrCodeMaxNumberOfDeliveryChannelsExceededException = "MaxNumberOfDeliveryChannelsExceededException"
// ErrCodeNoAvailableConfigurationRecorderException for service response error code
// "NoAvailableConfigurationRecorderException".
//
// There are no configuration recorders available to provide the role needed
// to describe your resources. Create a configuration recorder.
ErrCodeNoAvailableConfigurationRecorderException = "NoAvailableConfigurationRecorderException"
// ErrCodeNoAvailableDeliveryChannelException for service response error code
// "NoAvailableDeliveryChannelException".
//
// There is no delivery channel available to record configurations.
ErrCodeNoAvailableDeliveryChannelException = "NoAvailableDeliveryChannelException"
// ErrCodeNoRunningConfigurationRecorderException for service response error code
// "NoRunningConfigurationRecorderException".
//
// There is no configuration recorder running.
ErrCodeNoRunningConfigurationRecorderException = "NoRunningConfigurationRecorderException"
// ErrCodeNoSuchBucketException for service response error code
// "NoSuchBucketException".
//
// The specified Amazon S3 bucket does not exist.
ErrCodeNoSuchBucketException = "NoSuchBucketException"
// ErrCodeNoSuchConfigRuleException for service response error code
// "NoSuchConfigRuleException".
//
// One or more AWS Config rules in the request are invalid. Verify that the
// rule names are correct and try again.
ErrCodeNoSuchConfigRuleException = "NoSuchConfigRuleException"
// ErrCodeNoSuchConfigurationRecorderException for service response error code
// "NoSuchConfigurationRecorderException".
//
// You have specified a configuration recorder that does not exist.
ErrCodeNoSuchConfigurationRecorderException = "NoSuchConfigurationRecorderException"
// ErrCodeNoSuchDeliveryChannelException for service response error code
// "NoSuchDeliveryChannelException".
//
// You have specified a delivery channel that does not exist.
ErrCodeNoSuchDeliveryChannelException = "NoSuchDeliveryChannelException"
// ErrCodeResourceInUseException for service response error code
// "ResourceInUseException".
//
// The rule is currently being deleted or the rule is deleting your evaluation
// results. Try your request again later.
ErrCodeResourceInUseException = "ResourceInUseException"
// ErrCodeResourceNotDiscoveredException for service response error code
// "ResourceNotDiscoveredException".
//
// You have specified a resource that is either unknown or has not been discovered.
ErrCodeResourceNotDiscoveredException = "ResourceNotDiscoveredException"
// ErrCodeValidationException for service response error code
// "ValidationException".
//
// The requested action is not valid.
ErrCodeValidationException = "ValidationException"
)
+687
View File
@@ -0,0 +1,687 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package configservice_test
import (
"bytes"
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/configservice"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleConfigService_DeleteConfigRule() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DeleteConfigRuleInput{
ConfigRuleName: aws.String("StringWithCharLimit64"), // Required
}
resp, err := svc.DeleteConfigRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DeleteConfigurationRecorder() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DeleteConfigurationRecorderInput{
ConfigurationRecorderName: aws.String("RecorderName"), // Required
}
resp, err := svc.DeleteConfigurationRecorder(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DeleteDeliveryChannel() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DeleteDeliveryChannelInput{
DeliveryChannelName: aws.String("ChannelName"), // Required
}
resp, err := svc.DeleteDeliveryChannel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DeleteEvaluationResults() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DeleteEvaluationResultsInput{
ConfigRuleName: aws.String("StringWithCharLimit64"), // Required
}
resp, err := svc.DeleteEvaluationResults(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DeliverConfigSnapshot() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DeliverConfigSnapshotInput{
DeliveryChannelName: aws.String("ChannelName"), // Required
}
resp, err := svc.DeliverConfigSnapshot(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeComplianceByConfigRule() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeComplianceByConfigRuleInput{
ComplianceTypes: []*string{
aws.String("ComplianceType"), // Required
// More values...
},
ConfigRuleNames: []*string{
aws.String("StringWithCharLimit64"), // Required
// More values...
},
NextToken: aws.String("String"),
}
resp, err := svc.DescribeComplianceByConfigRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeComplianceByResource() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeComplianceByResourceInput{
ComplianceTypes: []*string{
aws.String("ComplianceType"), // Required
// More values...
},
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
ResourceId: aws.String("StringWithCharLimit256"),
ResourceType: aws.String("StringWithCharLimit256"),
}
resp, err := svc.DescribeComplianceByResource(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeConfigRuleEvaluationStatus() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeConfigRuleEvaluationStatusInput{
ConfigRuleNames: []*string{
aws.String("StringWithCharLimit64"), // Required
// More values...
},
Limit: aws.Int64(1),
NextToken: aws.String("String"),
}
resp, err := svc.DescribeConfigRuleEvaluationStatus(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeConfigRules() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeConfigRulesInput{
ConfigRuleNames: []*string{
aws.String("StringWithCharLimit64"), // Required
// More values...
},
NextToken: aws.String("String"),
}
resp, err := svc.DescribeConfigRules(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeConfigurationRecorderStatus() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeConfigurationRecorderStatusInput{
ConfigurationRecorderNames: []*string{
aws.String("RecorderName"), // Required
// More values...
},
}
resp, err := svc.DescribeConfigurationRecorderStatus(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeConfigurationRecorders() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeConfigurationRecordersInput{
ConfigurationRecorderNames: []*string{
aws.String("RecorderName"), // Required
// More values...
},
}
resp, err := svc.DescribeConfigurationRecorders(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeDeliveryChannelStatus() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeDeliveryChannelStatusInput{
DeliveryChannelNames: []*string{
aws.String("ChannelName"), // Required
// More values...
},
}
resp, err := svc.DescribeDeliveryChannelStatus(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_DescribeDeliveryChannels() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.DescribeDeliveryChannelsInput{
DeliveryChannelNames: []*string{
aws.String("ChannelName"), // Required
// More values...
},
}
resp, err := svc.DescribeDeliveryChannels(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_GetComplianceDetailsByConfigRule() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.GetComplianceDetailsByConfigRuleInput{
ConfigRuleName: aws.String("StringWithCharLimit64"), // Required
ComplianceTypes: []*string{
aws.String("ComplianceType"), // Required
// More values...
},
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.GetComplianceDetailsByConfigRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_GetComplianceDetailsByResource() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.GetComplianceDetailsByResourceInput{
ResourceId: aws.String("StringWithCharLimit256"), // Required
ResourceType: aws.String("StringWithCharLimit256"), // Required
ComplianceTypes: []*string{
aws.String("ComplianceType"), // Required
// More values...
},
NextToken: aws.String("String"),
}
resp, err := svc.GetComplianceDetailsByResource(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_GetComplianceSummaryByConfigRule() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
var params *configservice.GetComplianceSummaryByConfigRuleInput
resp, err := svc.GetComplianceSummaryByConfigRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_GetComplianceSummaryByResourceType() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.GetComplianceSummaryByResourceTypeInput{
ResourceTypes: []*string{
aws.String("StringWithCharLimit256"), // Required
// More values...
},
}
resp, err := svc.GetComplianceSummaryByResourceType(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_GetResourceConfigHistory() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.GetResourceConfigHistoryInput{
ResourceId: aws.String("ResourceId"), // Required
ResourceType: aws.String("ResourceType"), // Required
ChronologicalOrder: aws.String("ChronologicalOrder"),
EarlierTime: aws.Time(time.Now()),
LaterTime: aws.Time(time.Now()),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.GetResourceConfigHistory(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_ListDiscoveredResources() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.ListDiscoveredResourcesInput{
ResourceType: aws.String("ResourceType"), // Required
IncludeDeletedResources: aws.Bool(true),
Limit: aws.Int64(1),
NextToken: aws.String("NextToken"),
ResourceIds: []*string{
aws.String("ResourceId"), // Required
// More values...
},
ResourceName: aws.String("ResourceName"),
}
resp, err := svc.ListDiscoveredResources(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_PutConfigRule() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.PutConfigRuleInput{
ConfigRule: &configservice.ConfigRule{ // Required
Source: &configservice.Source{ // Required
Owner: aws.String("Owner"), // Required
SourceIdentifier: aws.String("StringWithCharLimit256"), // Required
SourceDetails: []*configservice.SourceDetail{
{ // Required
EventSource: aws.String("EventSource"),
MaximumExecutionFrequency: aws.String("MaximumExecutionFrequency"),
MessageType: aws.String("MessageType"),
},
// More values...
},
},
ConfigRuleArn: aws.String("String"),
ConfigRuleId: aws.String("String"),
ConfigRuleName: aws.String("StringWithCharLimit64"),
ConfigRuleState: aws.String("ConfigRuleState"),
Description: aws.String("EmptiableStringWithCharLimit256"),
InputParameters: aws.String("StringWithCharLimit1024"),
MaximumExecutionFrequency: aws.String("MaximumExecutionFrequency"),
Scope: &configservice.Scope{
ComplianceResourceId: aws.String("StringWithCharLimit256"),
ComplianceResourceTypes: []*string{
aws.String("StringWithCharLimit256"), // Required
// More values...
},
TagKey: aws.String("StringWithCharLimit128"),
TagValue: aws.String("StringWithCharLimit256"),
},
},
}
resp, err := svc.PutConfigRule(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_PutConfigurationRecorder() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.PutConfigurationRecorderInput{
ConfigurationRecorder: &configservice.ConfigurationRecorder{ // Required
Name: aws.String("RecorderName"),
RecordingGroup: &configservice.RecordingGroup{
AllSupported: aws.Bool(true),
IncludeGlobalResourceTypes: aws.Bool(true),
ResourceTypes: []*string{
aws.String("ResourceType"), // Required
// More values...
},
},
RoleARN: aws.String("String"),
},
}
resp, err := svc.PutConfigurationRecorder(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_PutDeliveryChannel() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.PutDeliveryChannelInput{
DeliveryChannel: &configservice.DeliveryChannel{ // Required
ConfigSnapshotDeliveryProperties: &configservice.ConfigSnapshotDeliveryProperties{
DeliveryFrequency: aws.String("MaximumExecutionFrequency"),
},
Name: aws.String("ChannelName"),
S3BucketName: aws.String("String"),
S3KeyPrefix: aws.String("String"),
SnsTopicARN: aws.String("String"),
},
}
resp, err := svc.PutDeliveryChannel(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_PutEvaluations() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.PutEvaluationsInput{
ResultToken: aws.String("String"), // Required
Evaluations: []*configservice.Evaluation{
{ // Required
ComplianceResourceId: aws.String("StringWithCharLimit256"), // Required
ComplianceResourceType: aws.String("StringWithCharLimit256"), // Required
ComplianceType: aws.String("ComplianceType"), // Required
OrderingTimestamp: aws.Time(time.Now()), // Required
Annotation: aws.String("StringWithCharLimit256"),
},
// More values...
},
TestMode: aws.Bool(true),
}
resp, err := svc.PutEvaluations(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_StartConfigRulesEvaluation() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.StartConfigRulesEvaluationInput{
ConfigRuleNames: []*string{
aws.String("StringWithCharLimit64"), // Required
// More values...
},
}
resp, err := svc.StartConfigRulesEvaluation(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_StartConfigurationRecorder() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.StartConfigurationRecorderInput{
ConfigurationRecorderName: aws.String("RecorderName"), // Required
}
resp, err := svc.StartConfigurationRecorder(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
func ExampleConfigService_StopConfigurationRecorder() {
sess := session.Must(session.NewSession())
svc := configservice.New(sess)
params := &configservice.StopConfigurationRecorderInput{
ConfigurationRecorderName: aws.String("RecorderName"), // Required
}
resp, err := svc.StopConfigurationRecorder(params)
if err != nil {
// Print the error, cast err to awserr.Error to get the Code and
// Message from an error.
fmt.Println(err.Error())
return
}
// Pretty-print the response data.
fmt.Println(resp)
}
+116
View File
@@ -0,0 +1,116 @@
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
package configservice
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"
)
// AWS Config provides a way to keep track of the configurations of all the
// AWS resources associated with your AWS account. You can use AWS Config to
// get the current and historical configurations of each AWS resource and also
// to get information about the relationship between the resources. An AWS resource
// can be an Amazon Compute Cloud (Amazon EC2) instance, an Elastic Block Store
// (EBS) volume, an Elastic network Interface (ENI), or a security group. For
// a complete list of resources currently supported by AWS Config, see Supported
// AWS Resources (http://docs.aws.amazon.com/config/latest/developerguide/resource-config-reference.html#supported-resources).
//
// You can access and manage AWS Config through the AWS Management Console,
// the AWS Command Line Interface (AWS CLI), the AWS Config API, or the AWS
// SDKs for AWS Config
//
// This reference guide contains documentation for the AWS Config API and the
// AWS CLI commands that you can use to manage AWS Config.
//
// The AWS Config API uses the Signature Version 4 protocol for signing requests.
// For more information about how to sign a request with this protocol, see
// Signature Version 4 Signing Process (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
//
// For detailed information about AWS Config features and their associated actions
// or commands, as well as how to work with AWS Management Console, see What
// Is AWS Config? (http://docs.aws.amazon.com/config/latest/developerguide/WhatIsConfig.html)
// in the AWS Config Developer Guide.
// The service client's operations are safe to be used concurrently.
// It is not safe to mutate any of the client's properties though.
// Please also see https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12
type ConfigService 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 = "config" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the ConfigService 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 ConfigService client from just a session.
// svc := configservice.New(mySession)
//
// // Create a ConfigService client with additional configuration
// svc := configservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ConfigService {
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) *ConfigService {
svc := &ConfigService{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2014-11-12",
JSONVersion: "1.1",
TargetPrefix: "StarlingDoveService",
},
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 ConfigService operation and runs any
// custom request initialization.
func (c *ConfigService) 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
}