Exemplo n.º 1
0
func ExampleApplicationDiscoveryService_DeleteTags() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	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)
}
Exemplo n.º 2
0
func ExampleApplicationDiscoveryService_DescribeAgents() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	svc := applicationdiscoveryservice.New(sess)

	params := &applicationdiscoveryservice.DescribeAgentsInput{
		AgentIds: []*string{
			aws.String("AgentId"), // Required
			// 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)
}
Exemplo n.º 3
0
func ExampleApplicationDiscoveryService_StopDataCollectionByAgentIds() {
	sess, err := session.NewSession()
	if err != nil {
		fmt.Println("failed to create session,", err)
		return
	}

	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_ListConfigurations() {
	svc := applicationdiscoveryservice.New(session.New())

	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"),
	}
	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)
}
Exemplo n.º 5
0
func init() {
	gucumber.Before("@applicationdiscoveryservice", func() {
		gucumber.World["client"] = applicationdiscoveryservice.New(
			smoke.Session, &aws.Config{Region: aws.String("us-west-2")},
		)
	})
}
func ExampleApplicationDiscoveryService_ExportConfigurations() {
	svc := applicationdiscoveryservice.New(session.New())

	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_DescribeConfigurations() {
	svc := applicationdiscoveryservice.New(session.New())

	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)
}