mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
Upgrade AWS SDK to the latest version
This commit is contained in:
+554
-336
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+6
-2
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package configserviceiface provides an interface to enable mocking the AWS Config service client
|
||||
// for testing your code.
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
//
|
||||
// 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.
|
||||
// to inject custom request handlers into the SDK's request pipeline.
|
||||
//
|
||||
// // myFunc uses an SDK service client to make a request to
|
||||
// // AWS Config.
|
||||
@@ -128,6 +128,10 @@ type ConfigServiceAPI interface {
|
||||
GetComplianceSummaryByResourceTypeWithContext(aws.Context, *configservice.GetComplianceSummaryByResourceTypeInput, ...request.Option) (*configservice.GetComplianceSummaryByResourceTypeOutput, error)
|
||||
GetComplianceSummaryByResourceTypeRequest(*configservice.GetComplianceSummaryByResourceTypeInput) (*request.Request, *configservice.GetComplianceSummaryByResourceTypeOutput)
|
||||
|
||||
GetDiscoveredResourceCounts(*configservice.GetDiscoveredResourceCountsInput) (*configservice.GetDiscoveredResourceCountsOutput, error)
|
||||
GetDiscoveredResourceCountsWithContext(aws.Context, *configservice.GetDiscoveredResourceCountsInput, ...request.Option) (*configservice.GetDiscoveredResourceCountsOutput, error)
|
||||
GetDiscoveredResourceCountsRequest(*configservice.GetDiscoveredResourceCountsInput) (*request.Request, *configservice.GetDiscoveredResourceCountsOutput)
|
||||
|
||||
GetResourceConfigHistory(*configservice.GetResourceConfigHistoryInput) (*configservice.GetResourceConfigHistoryOutput, error)
|
||||
GetResourceConfigHistoryWithContext(aws.Context, *configservice.GetResourceConfigHistoryInput, ...request.Option) (*configservice.GetResourceConfigHistoryOutput, error)
|
||||
GetResourceConfigHistoryRequest(*configservice.GetResourceConfigHistoryInput) (*request.Request, *configservice.GetResourceConfigHistoryOutput)
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
// Package configservice provides the client and types for making API
|
||||
// requests to AWS Config.
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
// See https://docs.aws.amazon.com/goto/WebAPI/config-2014-11-12 for more information on this service.
|
||||
//
|
||||
// See configservice package documentation for more information.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/configservice/
|
||||
//
|
||||
// Using the Client
|
||||
//
|
||||
// To AWS Config 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 Config client ConfigService for more
|
||||
// information on creating client for this service.
|
||||
// https://docs.aws.amazon.com/sdk-for-go/api/service/configservice/#New
|
||||
package configservice
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package configservice
|
||||
|
||||
|
||||
-687
@@ -1,687 +0,0 @@
|
||||
// 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)
|
||||
}
|
||||
+6
-27
@@ -1,4 +1,4 @@
|
||||
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
|
||||
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
|
||||
|
||||
package configservice
|
||||
|
||||
@@ -11,33 +11,12 @@ import (
|
||||
"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).
|
||||
// ConfigService provides the API operation methods for making requests to
|
||||
// AWS Config. See this package's package overview docs
|
||||
// for details on the service.
|
||||
//
|
||||
// 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
|
||||
// ConfigService methods are safe to use concurrently. It is not safe to
|
||||
// modify mutate any of the struct's properties though.
|
||||
type ConfigService struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user