Switch to using the dep tool and update all the dependencies

This commit is contained in:
Nick Craig-Wood
2017-05-11 15:39:54 +01:00
parent 5135ff73cb
commit 98c2d2c41b
5321 changed files with 4483197 additions and 5918 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,140 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package applicationdiscoveryserviceiface provides an interface to enable mocking the AWS Application Discovery Service 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 applicationdiscoveryserviceiface
import (
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/service/applicationdiscoveryservice"
)
// ApplicationDiscoveryServiceAPI provides an interface to enable mocking the
// applicationdiscoveryservice.ApplicationDiscoveryService 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 Application Discovery Service.
// func myFunc(svc applicationdiscoveryserviceiface.ApplicationDiscoveryServiceAPI) bool {
// // Make svc.AssociateConfigurationItemsToApplication request
// }
//
// func main() {
// sess := session.New()
// svc := applicationdiscoveryservice.New(sess)
//
// myFunc(svc)
// }
//
// In your _test.go file:
//
// // Define a mock struct to be used in your unit tests of myFunc.
// type mockApplicationDiscoveryServiceClient struct {
// applicationdiscoveryserviceiface.ApplicationDiscoveryServiceAPI
// }
// func (m *mockApplicationDiscoveryServiceClient) AssociateConfigurationItemsToApplication(input *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error) {
// // mock response/functionality
// }
//
// func TestMyFunc(t *testing.T) {
// // Setup Test
// mockSvc := &mockApplicationDiscoveryServiceClient{}
//
// 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 ApplicationDiscoveryServiceAPI interface {
AssociateConfigurationItemsToApplication(*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error)
AssociateConfigurationItemsToApplicationWithContext(aws.Context, *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput, ...request.Option) (*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput, error)
AssociateConfigurationItemsToApplicationRequest(*applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput) (*request.Request, *applicationdiscoveryservice.AssociateConfigurationItemsToApplicationOutput)
CreateApplication(*applicationdiscoveryservice.CreateApplicationInput) (*applicationdiscoveryservice.CreateApplicationOutput, error)
CreateApplicationWithContext(aws.Context, *applicationdiscoveryservice.CreateApplicationInput, ...request.Option) (*applicationdiscoveryservice.CreateApplicationOutput, error)
CreateApplicationRequest(*applicationdiscoveryservice.CreateApplicationInput) (*request.Request, *applicationdiscoveryservice.CreateApplicationOutput)
CreateTags(*applicationdiscoveryservice.CreateTagsInput) (*applicationdiscoveryservice.CreateTagsOutput, error)
CreateTagsWithContext(aws.Context, *applicationdiscoveryservice.CreateTagsInput, ...request.Option) (*applicationdiscoveryservice.CreateTagsOutput, error)
CreateTagsRequest(*applicationdiscoveryservice.CreateTagsInput) (*request.Request, *applicationdiscoveryservice.CreateTagsOutput)
DeleteApplications(*applicationdiscoveryservice.DeleteApplicationsInput) (*applicationdiscoveryservice.DeleteApplicationsOutput, error)
DeleteApplicationsWithContext(aws.Context, *applicationdiscoveryservice.DeleteApplicationsInput, ...request.Option) (*applicationdiscoveryservice.DeleteApplicationsOutput, error)
DeleteApplicationsRequest(*applicationdiscoveryservice.DeleteApplicationsInput) (*request.Request, *applicationdiscoveryservice.DeleteApplicationsOutput)
DeleteTags(*applicationdiscoveryservice.DeleteTagsInput) (*applicationdiscoveryservice.DeleteTagsOutput, error)
DeleteTagsWithContext(aws.Context, *applicationdiscoveryservice.DeleteTagsInput, ...request.Option) (*applicationdiscoveryservice.DeleteTagsOutput, error)
DeleteTagsRequest(*applicationdiscoveryservice.DeleteTagsInput) (*request.Request, *applicationdiscoveryservice.DeleteTagsOutput)
DescribeAgents(*applicationdiscoveryservice.DescribeAgentsInput) (*applicationdiscoveryservice.DescribeAgentsOutput, error)
DescribeAgentsWithContext(aws.Context, *applicationdiscoveryservice.DescribeAgentsInput, ...request.Option) (*applicationdiscoveryservice.DescribeAgentsOutput, error)
DescribeAgentsRequest(*applicationdiscoveryservice.DescribeAgentsInput) (*request.Request, *applicationdiscoveryservice.DescribeAgentsOutput)
DescribeConfigurations(*applicationdiscoveryservice.DescribeConfigurationsInput) (*applicationdiscoveryservice.DescribeConfigurationsOutput, error)
DescribeConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.DescribeConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.DescribeConfigurationsOutput, error)
DescribeConfigurationsRequest(*applicationdiscoveryservice.DescribeConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeConfigurationsOutput)
DescribeExportConfigurations(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*applicationdiscoveryservice.DescribeExportConfigurationsOutput, error)
DescribeExportConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.DescribeExportConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.DescribeExportConfigurationsOutput, error)
DescribeExportConfigurationsRequest(*applicationdiscoveryservice.DescribeExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.DescribeExportConfigurationsOutput)
DescribeExportTasks(*applicationdiscoveryservice.DescribeExportTasksInput) (*applicationdiscoveryservice.DescribeExportTasksOutput, error)
DescribeExportTasksWithContext(aws.Context, *applicationdiscoveryservice.DescribeExportTasksInput, ...request.Option) (*applicationdiscoveryservice.DescribeExportTasksOutput, error)
DescribeExportTasksRequest(*applicationdiscoveryservice.DescribeExportTasksInput) (*request.Request, *applicationdiscoveryservice.DescribeExportTasksOutput)
DescribeTags(*applicationdiscoveryservice.DescribeTagsInput) (*applicationdiscoveryservice.DescribeTagsOutput, error)
DescribeTagsWithContext(aws.Context, *applicationdiscoveryservice.DescribeTagsInput, ...request.Option) (*applicationdiscoveryservice.DescribeTagsOutput, error)
DescribeTagsRequest(*applicationdiscoveryservice.DescribeTagsInput) (*request.Request, *applicationdiscoveryservice.DescribeTagsOutput)
DisassociateConfigurationItemsFromApplication(*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput) (*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput, error)
DisassociateConfigurationItemsFromApplicationWithContext(aws.Context, *applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput, ...request.Option) (*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput, error)
DisassociateConfigurationItemsFromApplicationRequest(*applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput) (*request.Request, *applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationOutput)
ExportConfigurations(*applicationdiscoveryservice.ExportConfigurationsInput) (*applicationdiscoveryservice.ExportConfigurationsOutput, error)
ExportConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.ExportConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.ExportConfigurationsOutput, error)
ExportConfigurationsRequest(*applicationdiscoveryservice.ExportConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ExportConfigurationsOutput)
GetDiscoverySummary(*applicationdiscoveryservice.GetDiscoverySummaryInput) (*applicationdiscoveryservice.GetDiscoverySummaryOutput, error)
GetDiscoverySummaryWithContext(aws.Context, *applicationdiscoveryservice.GetDiscoverySummaryInput, ...request.Option) (*applicationdiscoveryservice.GetDiscoverySummaryOutput, error)
GetDiscoverySummaryRequest(*applicationdiscoveryservice.GetDiscoverySummaryInput) (*request.Request, *applicationdiscoveryservice.GetDiscoverySummaryOutput)
ListConfigurations(*applicationdiscoveryservice.ListConfigurationsInput) (*applicationdiscoveryservice.ListConfigurationsOutput, error)
ListConfigurationsWithContext(aws.Context, *applicationdiscoveryservice.ListConfigurationsInput, ...request.Option) (*applicationdiscoveryservice.ListConfigurationsOutput, error)
ListConfigurationsRequest(*applicationdiscoveryservice.ListConfigurationsInput) (*request.Request, *applicationdiscoveryservice.ListConfigurationsOutput)
ListServerNeighbors(*applicationdiscoveryservice.ListServerNeighborsInput) (*applicationdiscoveryservice.ListServerNeighborsOutput, error)
ListServerNeighborsWithContext(aws.Context, *applicationdiscoveryservice.ListServerNeighborsInput, ...request.Option) (*applicationdiscoveryservice.ListServerNeighborsOutput, error)
ListServerNeighborsRequest(*applicationdiscoveryservice.ListServerNeighborsInput) (*request.Request, *applicationdiscoveryservice.ListServerNeighborsOutput)
StartDataCollectionByAgentIds(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput, error)
StartDataCollectionByAgentIdsWithContext(aws.Context, *applicationdiscoveryservice.StartDataCollectionByAgentIdsInput, ...request.Option) (*applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput, error)
StartDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StartDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StartDataCollectionByAgentIdsOutput)
StartExportTask(*applicationdiscoveryservice.StartExportTaskInput) (*applicationdiscoveryservice.StartExportTaskOutput, error)
StartExportTaskWithContext(aws.Context, *applicationdiscoveryservice.StartExportTaskInput, ...request.Option) (*applicationdiscoveryservice.StartExportTaskOutput, error)
StartExportTaskRequest(*applicationdiscoveryservice.StartExportTaskInput) (*request.Request, *applicationdiscoveryservice.StartExportTaskOutput)
StopDataCollectionByAgentIds(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput, error)
StopDataCollectionByAgentIdsWithContext(aws.Context, *applicationdiscoveryservice.StopDataCollectionByAgentIdsInput, ...request.Option) (*applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput, error)
StopDataCollectionByAgentIdsRequest(*applicationdiscoveryservice.StopDataCollectionByAgentIdsInput) (*request.Request, *applicationdiscoveryservice.StopDataCollectionByAgentIdsOutput)
UpdateApplication(*applicationdiscoveryservice.UpdateApplicationInput) (*applicationdiscoveryservice.UpdateApplicationOutput, error)
UpdateApplicationWithContext(aws.Context, *applicationdiscoveryservice.UpdateApplicationInput, ...request.Option) (*applicationdiscoveryservice.UpdateApplicationOutput, error)
UpdateApplicationRequest(*applicationdiscoveryservice.UpdateApplicationInput) (*request.Request, *applicationdiscoveryservice.UpdateApplicationOutput)
}
var _ ApplicationDiscoveryServiceAPI = (*applicationdiscoveryservice.ApplicationDiscoveryService)(nil)
@@ -0,0 +1,139 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
// Package applicationdiscoveryservice provides the client and types for making API
// requests to AWS Application Discovery Service.
//
// AWS Application Discovery Service helps you plan application migration projects
// by automatically identifying servers, virtual machines (VMs), software, and
// software dependencies running in your on-premises data centers. Application
// Discovery Service also collects application performance data, which can help
// you assess the outcome of your migration. The data collected by Application
// Discovery Service is securely retained in an Amazon-hosted and managed database
// in the cloud. You can export the data as a CSV or XML file into your preferred
// visualization tool or cloud-migration solution to plan your migration. For
// more information, see the Application Discovery Service FAQ (http://aws.amazon.com/application-discovery/faqs/).
//
// Application Discovery Service offers two modes of operation.
//
// * Agentless discovery mode is recommended for environments that use VMware
// vCenter Server. This mode doesn't require you to install an agent on each
// host. Agentless discovery gathers server information regardless of the
// operating systems, which minimizes the time required for initial on-premises
// infrastructure assessment. Agentless discovery doesn't collect information
// about software and software dependencies. It also doesn't work in non-VMware
// environments. We recommend that you use agent-based discovery for non-VMware
// environments and if you want to collect information about software and
// software dependencies. You can also run agent-based and agentless discovery
// simultaneously. Use agentless discovery to quickly complete the initial
// infrastructure assessment and then install agents on select hosts to gather
// information about software and software dependencies.
//
// * Agent-based discovery mode collects a richer set of data than agentless
// discovery by using Amazon software, the AWS Application Discovery Agent,
// which you install on one or more hosts in your data center. The agent
// captures infrastructure and application information, including an inventory
// of installed software applications, system and process performance, resource
// utilization, and network dependencies between workloads. The information
// collected by agents is secured at rest and in transit to the Application
// Discovery Service database in the cloud.
//
// Application Discovery Service integrates with application discovery solutions
// from AWS Partner Network (APN) partners. Third-party application discovery
// tools can query Application Discovery Service and write to the Application
// Discovery Service database using a public API. You can then import the data
// into either a visualization tool or cloud-migration solution.
//
// Application Discovery Service doesn't gather sensitive information. All data
// is handled according to the AWS Privacy Policy (http://aws.amazon.com/privacy/).
// You can operate Application Discovery Service using offline mode to inspect
// collected data before it is shared with the service.
//
// Your AWS account must be granted access to Application Discovery Service,
// a process called whitelisting. This is true for AWS partners and customers
// alike. To request access, sign up for AWS Application Discovery Service here
// (http://aws.amazon.com/application-discovery/preview/). We send you information
// about how to get started.
//
// This API reference provides descriptions, syntax, and usage examples for
// each of the actions and data types for Application Discovery Service. The
// topic for each action shows the API request parameters and the response.
// Alternatively, you can use one of the AWS SDKs to access an API that is tailored
// to the programming language or platform that you're using. For more information,
// see AWS SDKs (http://aws.amazon.com/tools/#SDKs).
//
// This guide is intended for use with the AWS Application Discovery Service
// User Guide (http://docs.aws.amazon.com/application-discovery/latest/userguide/).
//
// See https://docs.aws.amazon.com/goto/WebAPI/discovery-2015-11-01 for more information on this service.
//
// See applicationdiscoveryservice package documentation for more information.
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationdiscoveryservice/
//
// Using the Client
//
// To use the client for AWS Application Discovery Service you will first need
// to create a new instance of it.
//
// When creating a client for an AWS service you'll first need to have a Session
// already created. The Session provides configuration that can be shared
// between multiple service clients. Additional configuration can be applied to
// the Session and service's client when they are constructed. The aws package's
// Config type contains several fields such as Region for the AWS Region the
// client should make API requests too. The optional Config value can be provided
// as the variadic argument for Sessions and client creation.
//
// Once the service's client is created you can use it to make API requests the
// AWS service. These clients are safe to use concurrently.
//
// // Create a session to share configuration, and load external configuration.
// sess := session.Must(session.NewSession())
//
// // Create the service's client with the session.
// svc := applicationdiscoveryservice.New(sess)
//
// See the SDK's documentation for more information on how to use service clients.
// https://docs.aws.amazon.com/sdk-for-go/api/
//
// See aws package's Config type for more information on configuration options.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config
//
// See the AWS Application Discovery Service client ApplicationDiscoveryService for more
// information on creating the service's client.
// https://docs.aws.amazon.com/sdk-for-go/api/service/applicationdiscoveryservice/#New
//
// Once the client is created you can make an API request to the service.
// Each API method takes a input parameter, and returns the service response
// and an error.
//
// The API method will document which error codes the service can be returned
// by the operation if the service models the API operation's errors. These
// errors will also be available as const strings prefixed with "ErrCode".
//
// result, err := svc.AssociateConfigurationItemsToApplication(params)
// if err != nil {
// // Cast err to awserr.Error to handle specific error codes.
// aerr, ok := err.(awserr.Error)
// if ok && aerr.Code() == <error code to check for> {
// // Specific error code handling
// }
// return err
// }
//
// fmt.Println("AssociateConfigurationItemsToApplication result:")
// fmt.Println(result)
//
// Using the Client with Context
//
// The service's client also provides methods to make API requests with a Context
// value. This allows you to control the timeout, and cancellation of pending
// requests. These methods also take request Option as variadic parameter to apply
// additional configuration to the API request.
//
// ctx := context.Background()
//
// result, err := svc.AssociateConfigurationItemsToApplicationWithContext(ctx, params)
//
// See the request package documentation for more information on using Context pattern
// with the SDK.
// https://docs.aws.amazon.com/sdk-for-go/api/aws/request/
package applicationdiscoveryservice
@@ -0,0 +1,45 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package applicationdiscoveryservice
const (
// ErrCodeAuthorizationErrorException for service response error code
// "AuthorizationErrorException".
//
// The AWS user account does not have permission to perform the action. Check
// the IAM policy associated with this account.
ErrCodeAuthorizationErrorException = "AuthorizationErrorException"
// ErrCodeInvalidParameterException for service response error code
// "InvalidParameterException".
//
// One or more parameters are not valid. Verify the parameters and try again.
ErrCodeInvalidParameterException = "InvalidParameterException"
// ErrCodeInvalidParameterValueException for service response error code
// "InvalidParameterValueException".
//
// The value of one or more parameters are either invalid or out of range. Verify
// the parameter values and try again.
ErrCodeInvalidParameterValueException = "InvalidParameterValueException"
// ErrCodeOperationNotPermittedException for service response error code
// "OperationNotPermittedException".
//
// This operation is not permitted.
ErrCodeOperationNotPermittedException = "OperationNotPermittedException"
// ErrCodeResourceNotFoundException for service response error code
// "ResourceNotFoundException".
//
// The specified configuration ID was not located. Verify the configuration
// ID and try again.
ErrCodeResourceNotFoundException = "ResourceNotFoundException"
// ErrCodeServerInternalErrorException for service response error code
// "ServerInternalErrorException".
//
// The server experienced an internal error. Try again.
ErrCodeServerInternalErrorException = "ServerInternalErrorException"
)
@@ -0,0 +1,521 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package applicationdiscoveryservice_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/applicationdiscoveryservice"
)
var _ time.Duration
var _ bytes.Buffer
func ExampleApplicationDiscoveryService_AssociateConfigurationItemsToApplication() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.AssociateConfigurationItemsToApplicationInput{
ApplicationConfigurationId: aws.String("ApplicationId"), // Required
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
}
resp, err := svc.AssociateConfigurationItemsToApplication(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 ExampleApplicationDiscoveryService_CreateApplication() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.CreateApplicationInput{
Name: aws.String("String"), // Required
Description: aws.String("String"),
}
resp, err := svc.CreateApplication(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 ExampleApplicationDiscoveryService_CreateTags() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.CreateTagsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
Tags: []*applicationdiscoveryservice.Tag{ // Required
{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"), // Required
},
// More values...
},
}
resp, err := svc.CreateTags(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 ExampleApplicationDiscoveryService_DeleteApplications() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DeleteApplicationsInput{
ConfigurationIds: []*string{ // Required
aws.String("ApplicationId"), // Required
// More values...
},
}
resp, err := svc.DeleteApplications(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 ExampleApplicationDiscoveryService_DeleteTags() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DeleteTagsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
Tags: []*applicationdiscoveryservice.Tag{
{ // Required
Key: aws.String("TagKey"), // Required
Value: aws.String("TagValue"), // Required
},
// More values...
},
}
resp, err := svc.DeleteTags(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 ExampleApplicationDiscoveryService_DescribeAgents() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeAgentsInput{
AgentIds: []*string{
aws.String("AgentId"), // Required
// More values...
},
Filters: []*applicationdiscoveryservice.Filter{
{ // Required
Condition: aws.String("Condition"), // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("FilterValue"), // Required
// More values...
},
},
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeAgents(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 ExampleApplicationDiscoveryService_DescribeConfigurations() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeConfigurationsInput{
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
}
resp, err := svc.DescribeConfigurations(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 ExampleApplicationDiscoveryService_DescribeExportConfigurations() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeExportConfigurationsInput{
ExportIds: []*string{
aws.String("ConfigurationsExportId"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeExportConfigurations(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 ExampleApplicationDiscoveryService_DescribeExportTasks() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeExportTasksInput{
ExportIds: []*string{
aws.String("ConfigurationsExportId"), // Required
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeExportTasks(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 ExampleApplicationDiscoveryService_DescribeTags() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DescribeTagsInput{
Filters: []*applicationdiscoveryservice.TagFilter{
{ // Required
Name: aws.String("FilterName"), // Required
Values: []*string{ // Required
aws.String("FilterValue"), // Required
// More values...
},
},
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
}
resp, err := svc.DescribeTags(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 ExampleApplicationDiscoveryService_DisassociateConfigurationItemsFromApplication() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.DisassociateConfigurationItemsFromApplicationInput{
ApplicationConfigurationId: aws.String("ApplicationId"), // Required
ConfigurationIds: []*string{ // Required
aws.String("ConfigurationId"), // Required
// More values...
},
}
resp, err := svc.DisassociateConfigurationItemsFromApplication(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 ExampleApplicationDiscoveryService_ExportConfigurations() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
var params *applicationdiscoveryservice.ExportConfigurationsInput
resp, err := svc.ExportConfigurations(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 ExampleApplicationDiscoveryService_GetDiscoverySummary() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
var params *applicationdiscoveryservice.GetDiscoverySummaryInput
resp, err := svc.GetDiscoverySummary(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 ExampleApplicationDiscoveryService_ListConfigurations() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.ListConfigurationsInput{
ConfigurationType: aws.String("ConfigurationItemType"), // Required
Filters: []*applicationdiscoveryservice.Filter{
{ // Required
Condition: aws.String("Condition"), // Required
Name: aws.String("String"), // Required
Values: []*string{ // Required
aws.String("FilterValue"), // Required
// More values...
},
},
// More values...
},
MaxResults: aws.Int64(1),
NextToken: aws.String("NextToken"),
OrderBy: []*applicationdiscoveryservice.OrderByElement{
{ // Required
FieldName: aws.String("String"), // Required
SortOrder: aws.String("orderString"),
},
// More values...
},
}
resp, err := svc.ListConfigurations(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 ExampleApplicationDiscoveryService_ListServerNeighbors() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.ListServerNeighborsInput{
ConfigurationId: aws.String("ConfigurationId"), // Required
MaxResults: aws.Int64(1),
NeighborConfigurationIds: []*string{
aws.String("ConfigurationId"), // Required
// More values...
},
NextToken: aws.String("String"),
PortInformationNeeded: aws.Bool(true),
}
resp, err := svc.ListServerNeighbors(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 ExampleApplicationDiscoveryService_StartDataCollectionByAgentIds() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.StartDataCollectionByAgentIdsInput{
AgentIds: []*string{ // Required
aws.String("AgentId"), // Required
// More values...
},
}
resp, err := svc.StartDataCollectionByAgentIds(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 ExampleApplicationDiscoveryService_StartExportTask() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.StartExportTaskInput{
ExportDataFormat: []*string{
aws.String("ExportDataFormat"), // Required
// More values...
},
}
resp, err := svc.StartExportTask(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 ExampleApplicationDiscoveryService_StopDataCollectionByAgentIds() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.StopDataCollectionByAgentIdsInput{
AgentIds: []*string{ // Required
aws.String("AgentId"), // Required
// More values...
},
}
resp, err := svc.StopDataCollectionByAgentIds(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 ExampleApplicationDiscoveryService_UpdateApplication() {
sess := session.Must(session.NewSession())
svc := applicationdiscoveryservice.New(sess)
params := &applicationdiscoveryservice.UpdateApplicationInput{
ConfigurationId: aws.String("ApplicationId"), // Required
Description: aws.String("String"),
Name: aws.String("String"),
}
resp, err := svc.UpdateApplication(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)
}
@@ -0,0 +1,95 @@
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package applicationdiscoveryservice
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"
)
// ApplicationDiscoveryService provides the API operation methods for making requests to
// AWS Application Discovery Service. See this package's package overview docs
// for details on the service.
//
// ApplicationDiscoveryService methods are safe to use concurrently. It is not safe to
// modify mutate any of the struct's properties though.
type ApplicationDiscoveryService 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 = "discovery" // Service endpoint prefix API calls made to.
EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)
// New creates a new instance of the ApplicationDiscoveryService 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 ApplicationDiscoveryService client from just a session.
// svc := applicationdiscoveryservice.New(mySession)
//
// // Create a ApplicationDiscoveryService client with additional configuration
// svc := applicationdiscoveryservice.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func New(p client.ConfigProvider, cfgs ...*aws.Config) *ApplicationDiscoveryService {
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) *ApplicationDiscoveryService {
svc := &ApplicationDiscoveryService{
Client: client.New(
cfg,
metadata.ClientInfo{
ServiceName: ServiceName,
SigningName: signingName,
SigningRegion: signingRegion,
Endpoint: endpoint,
APIVersion: "2015-11-01",
JSONVersion: "1.1",
TargetPrefix: "AWSPoseidonService_V2015_11_01",
},
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 ApplicationDiscoveryService operation and runs any
// custom request initialization.
func (c *ApplicationDiscoveryService) 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
}