servicediscovery

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 9 Imported by: 48

Documentation

Overview

Package servicediscovery provides the client and types for making API requests to ServiceDiscovery.

AWS Cloud Map lets you configure public DNS, private DNS, or HTTP namespaces that your microservice applications run in. When an instance of the service becomes available, you can call the AWS Cloud Map API to register the instance with AWS Cloud Map. For public or private DNS namespaces, AWS Cloud Map automatically creates DNS records and an optional health check. Clients that submit public or private DNS queries, or HTTP requests, for the service receive an answer that contains up to eight healthy records.

See https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14 for more information on this service.

See servicediscovery package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/servicediscovery/

Using the Client

To use ServiceDiscovery 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 ServiceDiscovery client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/servicediscovery/#New

Index

Examples

Constants

View Source
const (
	ServiceName = "ServiceDiscovery" // Service's name
	ServiceID   = "ServiceDiscovery" // Service's identifier
	EndpointsID = "servicediscovery" // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeCustomHealthNotFound for service response error code
	// "CustomHealthNotFound".
	//
	// The health check for the instance that is specified by ServiceId and InstanceId
	// is not a custom health check.
	ErrCodeCustomHealthNotFound = "CustomHealthNotFound"

	// ErrCodeDuplicateRequest for service response error code
	// "DuplicateRequest".
	//
	// The operation is already in progress.
	ErrCodeDuplicateRequest = "DuplicateRequest"

	// ErrCodeInstanceNotFound for service response error code
	// "InstanceNotFound".
	//
	// No instance exists with the specified ID, or the instance was recently registered,
	// and information about the instance hasn't propagated yet.
	ErrCodeInstanceNotFound = "InstanceNotFound"

	// ErrCodeInvalidInput for service response error code
	// "InvalidInput".
	//
	// One or more specified values aren't valid. For example, a required value
	// might be missing, a numeric value might be outside the allowed range, or
	// a string value might exceed length constraints.
	ErrCodeInvalidInput = "InvalidInput"

	// ErrCodeNamespaceAlreadyExists for service response error code
	// "NamespaceAlreadyExists".
	//
	// The namespace that you're trying to create already exists.
	ErrCodeNamespaceAlreadyExists = "NamespaceAlreadyExists"

	// ErrCodeNamespaceNotFound for service response error code
	// "NamespaceNotFound".
	//
	// No namespace exists with the specified ID.
	ErrCodeNamespaceNotFound = "NamespaceNotFound"

	// ErrCodeOperationNotFound for service response error code
	// "OperationNotFound".
	//
	// No operation exists with the specified ID.
	ErrCodeOperationNotFound = "OperationNotFound"

	// ErrCodeRequestLimitExceeded for service response error code
	// "RequestLimitExceeded".
	//
	// The operation can't be completed because you've reached the limit on the
	// number of requests.
	ErrCodeRequestLimitExceeded = "RequestLimitExceeded"

	// ErrCodeResourceInUse for service response error code
	// "ResourceInUse".
	//
	// The specified resource can't be deleted because it contains other resources.
	// For example, you can't delete a service that contains any instances.
	ErrCodeResourceInUse = "ResourceInUse"

	// ErrCodeResourceLimitExceeded for service response error code
	// "ResourceLimitExceeded".
	//
	// The resource can't be created because you've reached the limit on the number
	// of resources.
	ErrCodeResourceLimitExceeded = "ResourceLimitExceeded"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	//
	// The operation can't be completed because the resource was not found.
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeServiceAlreadyExists for service response error code
	// "ServiceAlreadyExists".
	//
	// The service can't be created because a service with the same name already
	// exists.
	ErrCodeServiceAlreadyExists = "ServiceAlreadyExists"

	// ErrCodeServiceNotFound for service response error code
	// "ServiceNotFound".
	//
	// No service exists with the specified ID.
	ErrCodeServiceNotFound = "ServiceNotFound"

	// ErrCodeTooManyTagsException for service response error code
	// "TooManyTagsException".
	//
	// The list of tags on the resource is over the limit. The maximum number of
	// tags that can be applied to a resource is 50.
	ErrCodeTooManyTagsException = "TooManyTagsException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.9.0

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to ServiceDiscovery. See this package's package overview docs for details on the service.

The client's methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := servicediscovery.New(myConfig)

func (*Client) CreateHttpNamespaceRequest added in v0.9.0

func (c *Client) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) CreateHttpNamespaceRequest

CreateHttpNamespaceRequest returns a request value for making API operation for AWS Cloud Map.

Creates an HTTP namespace. Service instances that you register using an HTTP namespace can be discovered using a DiscoverInstances request but can't be discovered using DNS.

For the current limit on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the AWS Cloud Map Developer Guide.

// Example sending a request using CreateHttpNamespaceRequest.
req := client.CreateHttpNamespaceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace

Example (Shared00)

CreateHttpNamespace example

This example creates an HTTP namespace.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.CreateHttpNamespaceInput{
		CreatorRequestId: aws.String("example-creator-request-id-0001"),
		Description:      aws.String("Example.com AWS Cloud Map HTTP Namespace"),
		Name:             aws.String("example-http.com"),
	}

	req := svc.CreateHttpNamespaceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeNamespaceAlreadyExists:
				fmt.Println(servicediscovery.ErrCodeNamespaceAlreadyExists, aerr.Error())
			case servicediscovery.ErrCodeResourceLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error())
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeTooManyTagsException:
				fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreatePrivateDnsNamespaceRequest added in v0.9.0

func (c *Client) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) CreatePrivateDnsNamespaceRequest

CreatePrivateDnsNamespaceRequest returns a request value for making API operation for AWS Cloud Map.

Creates a private namespace based on DNS, which will be visible only inside a specified Amazon VPC. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service will be backend.example.com. For the current limit on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the AWS Cloud Map Developer Guide.

// Example sending a request using CreatePrivateDnsNamespaceRequest.
req := client.CreatePrivateDnsNamespaceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace

Example (Shared00)

Example: Create private DNS namespace

Example: Create private DNS namespace

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.CreatePrivateDnsNamespaceInput{
		CreatorRequestId: aws.String("eedd6892-50f3-41b2-8af9-611d6e1d1a8c"),
		Name:             aws.String("example.com"),
		Vpc:              aws.String("vpc-1c56417b"),
	}

	req := svc.CreatePrivateDnsNamespaceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeNamespaceAlreadyExists:
				fmt.Println(servicediscovery.ErrCodeNamespaceAlreadyExists, aerr.Error())
			case servicediscovery.ErrCodeResourceLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error())
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeTooManyTagsException:
				fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreatePublicDnsNamespaceRequest added in v0.9.0

func (c *Client) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) CreatePublicDnsNamespaceRequest

CreatePublicDnsNamespaceRequest returns a request value for making API operation for AWS Cloud Map.

Creates a public namespace based on DNS, which will be visible on the internet. The namespace defines your service naming scheme. For example, if you name your namespace example.com and name your service backend, the resulting DNS name for the service will be backend.example.com. For the current limit on the number of namespaces that you can create using the same AWS account, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the AWS Cloud Map Developer Guide.

// Example sending a request using CreatePublicDnsNamespaceRequest.
req := client.CreatePublicDnsNamespaceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace

Example (Shared00)

CreatePublicDnsNamespace example

This example creates a public namespace based on DNS.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.CreatePublicDnsNamespaceInput{
		CreatorRequestId: aws.String("example-creator-request-id-0003"),
		Description:      aws.String("Example.com AWS Cloud Map Public DNS Namespace"),
		Name:             aws.String("example-public-dns.com"),
	}

	req := svc.CreatePublicDnsNamespaceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeNamespaceAlreadyExists:
				fmt.Println(servicediscovery.ErrCodeNamespaceAlreadyExists, aerr.Error())
			case servicediscovery.ErrCodeResourceLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error())
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeTooManyTagsException:
				fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) CreateServiceRequest added in v0.9.0

func (c *Client) CreateServiceRequest(input *CreateServiceInput) CreateServiceRequest

CreateServiceRequest returns a request value for making API operation for AWS Cloud Map.

Creates a service, which defines the configuration for the following entities:

  • For public and private DNS namespaces, one of the following combinations of DNS records in Amazon Route 53: A AAAA A and AAAA SRV CNAME

  • Optionally, a health check

After you create the service, you can submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html) request, and AWS Cloud Map uses the values in the configuration to create the specified entities.

For the current limit on the number of instances that you can register using the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the AWS Cloud Map Developer Guide.

// Example sending a request using CreateServiceRequest.
req := client.CreateServiceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService

Example (Shared00)

Example: Create service

Example: Create service

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.CreateServiceInput{
		CreatorRequestId: aws.String("567c1193-6b00-4308-bd57-ad38a8822d25"),
		DnsConfig: &servicediscovery.DnsConfig{
			DnsRecords: []servicediscovery.DnsRecord{
				{
					TTL:  aws.Int64(60),
					Type: servicediscovery.RecordTypeA,
				},
			},
			NamespaceId:   aws.String("ns-ylexjili4cdxy3xm"),
			RoutingPolicy: servicediscovery.RoutingPolicyMultivalue,
		},
		Name:        aws.String("myservice"),
		NamespaceId: aws.String("ns-ylexjili4cdxy3xm"),
	}

	req := svc.CreateServiceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeResourceLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error())
			case servicediscovery.ErrCodeNamespaceNotFound:
				fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error())
			case servicediscovery.ErrCodeServiceAlreadyExists:
				fmt.Println(servicediscovery.ErrCodeServiceAlreadyExists, aerr.Error())
			case servicediscovery.ErrCodeTooManyTagsException:
				fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteNamespaceRequest added in v0.9.0

func (c *Client) DeleteNamespaceRequest(input *DeleteNamespaceInput) DeleteNamespaceRequest

DeleteNamespaceRequest returns a request value for making API operation for AWS Cloud Map.

Deletes a namespace from the current account. If the namespace still contains one or more services, the request fails.

// Example sending a request using DeleteNamespaceRequest.
req := client.DeleteNamespaceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace

Example (Shared00)

Example: Delete namespace

Example: Delete namespace

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.DeleteNamespaceInput{
		Id: aws.String("ns-ylexjili4cdxy3xm"),
	}

	req := svc.DeleteNamespaceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeNamespaceNotFound:
				fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error())
			case servicediscovery.ErrCodeResourceInUse:
				fmt.Println(servicediscovery.ErrCodeResourceInUse, aerr.Error())
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeleteServiceRequest added in v0.9.0

func (c *Client) DeleteServiceRequest(input *DeleteServiceInput) DeleteServiceRequest

DeleteServiceRequest returns a request value for making API operation for AWS Cloud Map.

Deletes a specified service. If the service still contains one or more registered instances, the request fails.

// Example sending a request using DeleteServiceRequest.
req := client.DeleteServiceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService

Example (Shared00)

Example: Delete service

Example: Delete service

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.DeleteServiceInput{
		Id: aws.String("srv-p5zdwlg5uvvzjita"),
	}

	req := svc.DeleteServiceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			case servicediscovery.ErrCodeResourceInUse:
				fmt.Println(servicediscovery.ErrCodeResourceInUse, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DeregisterInstanceRequest added in v0.9.0

func (c *Client) DeregisterInstanceRequest(input *DeregisterInstanceInput) DeregisterInstanceRequest

DeregisterInstanceRequest returns a request value for making API operation for AWS Cloud Map.

Deletes the Amazon Route 53 DNS records and health check, if any, that AWS Cloud Map created for the specified instance.

// Example sending a request using DeregisterInstanceRequest.
req := client.DeregisterInstanceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance

Example (Shared00)

Example: Deregister a service instance

Example: Deregister a service instance

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.DeregisterInstanceInput{
		InstanceId: aws.String("myservice-53"),
		ServiceId:  aws.String("srv-p5zdwlg5uvvzjita"),
	}

	req := svc.DeregisterInstanceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeInstanceNotFound:
				fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error())
			case servicediscovery.ErrCodeResourceInUse:
				fmt.Println(servicediscovery.ErrCodeResourceInUse, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) DiscoverInstancesRequest added in v0.9.0

func (c *Client) DiscoverInstancesRequest(input *DiscoverInstancesInput) DiscoverInstancesRequest

DiscoverInstancesRequest returns a request value for making API operation for AWS Cloud Map.

Discovers registered instances for a specified namespace and service. You can use DiscoverInstances to discover instances for any type of namespace. For public and private DNS namespaces, you can also use DNS queries to discover instances.

// Example sending a request using DiscoverInstancesRequest.
req := client.DiscoverInstancesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances

Example (Shared00)

Example: Discover registered instances

Example: Discover registered instances

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.DiscoverInstancesInput{
		HealthStatus:  servicediscovery.HealthStatusFilterAll,
		MaxResults:    aws.Int64(10),
		NamespaceName: aws.String("example.com"),
		ServiceName:   aws.String("myservice"),
	}

	req := svc.DiscoverInstancesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			case servicediscovery.ErrCodeNamespaceNotFound:
				fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeRequestLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeRequestLimitExceeded, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) GetInstanceRequest added in v0.9.0

func (c *Client) GetInstanceRequest(input *GetInstanceInput) GetInstanceRequest

GetInstanceRequest returns a request value for making API operation for AWS Cloud Map.

Gets information about a specified instance.

// Example sending a request using GetInstanceRequest.
req := client.GetInstanceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance

Example (Shared00)

GetInstance example

This example gets information about a specified instance.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.GetInstanceInput{
		InstanceId: aws.String("i-abcd1234"),
		ServiceId:  aws.String("srv-e4anhexample0004"),
	}

	req := svc.GetInstanceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInstanceNotFound:
				fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) GetInstancesHealthStatusRequest added in v0.9.0

func (c *Client) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) GetInstancesHealthStatusRequest

GetInstancesHealthStatusRequest returns a request value for making API operation for AWS Cloud Map.

Gets the current health status (Healthy, Unhealthy, or Unknown) of one or more instances that are associated with a specified service.

There is a brief delay between when you register an instance and when the health status for the instance is available.

// Example sending a request using GetInstancesHealthStatusRequest.
req := client.GetInstancesHealthStatusRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus

Example (Shared00)

GetInstancesHealthStatus example

This example gets the current health status of one or more instances that are associate with a specified service.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.GetInstancesHealthStatusInput{
		ServiceId: aws.String("srv-e4anhexample0004"),
	}

	req := svc.GetInstancesHealthStatusRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInstanceNotFound:
				fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) GetNamespaceRequest added in v0.9.0

func (c *Client) GetNamespaceRequest(input *GetNamespaceInput) GetNamespaceRequest

GetNamespaceRequest returns a request value for making API operation for AWS Cloud Map.

Gets information about a namespace.

// Example sending a request using GetNamespaceRequest.
req := client.GetNamespaceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace

Example (Shared00)

GetNamespace example

This example gets information about a specified namespace.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.GetNamespaceInput{
		Id: aws.String("ns-e4anhexample0004"),
	}

	req := svc.GetNamespaceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeNamespaceNotFound:
				fmt.Println(servicediscovery.ErrCodeNamespaceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) GetOperationRequest added in v0.9.0

func (c *Client) GetOperationRequest(input *GetOperationInput) GetOperationRequest

GetOperationRequest returns a request value for making API operation for AWS Cloud Map.

Gets information about any operation that returns an operation ID in the response, such as a CreateService request.

To get a list of operations that match specified criteria, see ListOperations (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html).

// Example sending a request using GetOperationRequest.
req := client.GetOperationRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation

Example (Shared00)

Example: Get operation result

Example: Get operation result

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.GetOperationInput{
		OperationId: aws.String("gv4g5meo7ndmeh4fqskygvk23d2fijwa-k9302yzd"),
	}

	req := svc.GetOperationRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeOperationNotFound:
				fmt.Println(servicediscovery.ErrCodeOperationNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) GetServiceRequest added in v0.9.0

func (c *Client) GetServiceRequest(input *GetServiceInput) GetServiceRequest

GetServiceRequest returns a request value for making API operation for AWS Cloud Map.

Gets the settings for a specified service.

// Example sending a request using GetServiceRequest.
req := client.GetServiceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService

Example (Shared00)

GetService Example

This example gets the settings for a specified service.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.GetServiceInput{
		Id: aws.String("srv-e4anhexample0004"),
	}

	req := svc.GetServiceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListInstancesRequest added in v0.9.0

func (c *Client) ListInstancesRequest(input *ListInstancesInput) ListInstancesRequest

ListInstancesRequest returns a request value for making API operation for AWS Cloud Map.

Lists summary information about the instances that you registered by using a specified service.

// Example sending a request using ListInstancesRequest.
req := client.ListInstancesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances

Example (Shared00)

Example: List service instances

Example: List service instances

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.ListInstancesInput{
		ServiceId: aws.String("srv-qzpwvt2tfqcegapy"),
	}

	req := svc.ListInstancesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListNamespacesRequest added in v0.9.0

func (c *Client) ListNamespacesRequest(input *ListNamespacesInput) ListNamespacesRequest

ListNamespacesRequest returns a request value for making API operation for AWS Cloud Map.

Lists summary information about the namespaces that were created by the current AWS account.

// Example sending a request using ListNamespacesRequest.
req := client.ListNamespacesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces

Example (Shared00)

Example: List namespaces

Example: List namespaces

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.ListNamespacesInput{}

	req := svc.ListNamespacesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListOperationsRequest added in v0.9.0

func (c *Client) ListOperationsRequest(input *ListOperationsInput) ListOperationsRequest

ListOperationsRequest returns a request value for making API operation for AWS Cloud Map.

Lists operations that match the criteria that you specify.

// Example sending a request using ListOperationsRequest.
req := client.ListOperationsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations

Example (Shared00)

ListOperations Example

This example gets the operations that have a STATUS of either PENDING or SUCCESS.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.ListOperationsInput{
		Filters: []servicediscovery.OperationFilter{
			{
				Condition: servicediscovery.FilterConditionIn,
				Name:      servicediscovery.OperationFilterNameStatus,
				Values: []string{
					"PENDING",
					"SUCCESS",
				},
			},
		},
	}

	req := svc.ListOperationsRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListServicesRequest added in v0.9.0

func (c *Client) ListServicesRequest(input *ListServicesInput) ListServicesRequest

ListServicesRequest returns a request value for making API operation for AWS Cloud Map.

Lists summary information for all the services that are associated with one or more specified namespaces.

// Example sending a request using ListServicesRequest.
req := client.ListServicesRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices

Example (Shared00)

Example: List services

Example: List services

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.ListServicesInput{}

	req := svc.ListServicesRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) ListTagsForResourceRequest added in v0.24.0

func (c *Client) ListTagsForResourceRequest(input *ListTagsForResourceInput) ListTagsForResourceRequest

ListTagsForResourceRequest returns a request value for making API operation for AWS Cloud Map.

Lists tags for the specified resource.

// Example sending a request using ListTagsForResourceRequest.
req := client.ListTagsForResourceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListTagsForResource

Example (Shared00)

ListTagsForResource example

This example lists the tags of a resource.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.ListTagsForResourceInput{
		ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"),
	}

	req := svc.ListTagsForResourceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeResourceNotFoundException:
				fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) RegisterInstanceRequest added in v0.9.0

func (c *Client) RegisterInstanceRequest(input *RegisterInstanceInput) RegisterInstanceRequest

RegisterInstanceRequest returns a request value for making API operation for AWS Cloud Map.

Creates or updates one or more records and, optionally, creates a health check based on the settings in a specified service. When you submit a RegisterInstance request, the following occurs:

  • For each DNS record that you define in the service that is specified by ServiceId, a record is created or updated in the hosted zone that is associated with the corresponding namespace.

  • If the service includes HealthCheckConfig, a health check is created based on the settings in the health check configuration.

  • The health check, if any, is associated with each of the new or updated records.

One RegisterInstance request must complete before you can submit another request and specify the same service ID and instance ID.

For more information, see CreateService (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html).

When AWS Cloud Map receives a DNS query for the specified DNS name, it returns the applicable value:

  • If the health check is healthy: returns all the records

  • If the health check is unhealthy: returns the applicable value for the last healthy instance

  • If you didn't specify a health check configuration: returns all the records

For the current limit on the number of instances that you can register using the same namespace and using the same service, see AWS Cloud Map Limits (https://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) in the AWS Cloud Map Developer Guide.

// Example sending a request using RegisterInstanceRequest.
req := client.RegisterInstanceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance

Example (Shared00)

Example: Register Instance

Example: Register Instance

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.RegisterInstanceInput{
		Attributes: map[string]string{
			"AWS_INSTANCE_IPV4": "172.2.1.3",
			"AWS_INSTANCE_PORT": "808",
		},
		CreatorRequestId: aws.String("7a48a98a-72e6-4849-bfa7-1a458e030d7b"),
		InstanceId:       aws.String("myservice-53"),
		ServiceId:        aws.String("srv-p5zdwlg5uvvzjita"),
	}

	req := svc.RegisterInstanceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeResourceInUse:
				fmt.Println(servicediscovery.ErrCodeResourceInUse, aerr.Error())
			case servicediscovery.ErrCodeResourceLimitExceeded:
				fmt.Println(servicediscovery.ErrCodeResourceLimitExceeded, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) TagResourceRequest added in v0.24.0

func (c *Client) TagResourceRequest(input *TagResourceInput) TagResourceRequest

TagResourceRequest returns a request value for making API operation for AWS Cloud Map.

Adds one or more tags to the specified resource.

// Example sending a request using TagResourceRequest.
req := client.TagResourceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/TagResource

Example (Shared00)

TagResource example

This example adds "Department" and "Project" tags to a resource.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.TagResourceInput{
		ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"),
		Tags: []servicediscovery.Tag{
			{
				Key:   aws.String("Department"),
				Value: aws.String("Engineering"),
			},
			{
				Key:   aws.String("Project"),
				Value: aws.String("Zeta"),
			},
		},
	}

	req := svc.TagResourceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeResourceNotFoundException:
				fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error())
			case servicediscovery.ErrCodeTooManyTagsException:
				fmt.Println(servicediscovery.ErrCodeTooManyTagsException, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) UntagResourceRequest added in v0.24.0

func (c *Client) UntagResourceRequest(input *UntagResourceInput) UntagResourceRequest

UntagResourceRequest returns a request value for making API operation for AWS Cloud Map.

Removes one or more tags from the specified resource.

// Example sending a request using UntagResourceRequest.
req := client.UntagResourceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UntagResource

Example (Shared00)

UntagResource example

This example removes the "Department" and "Project" tags from a resource.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.UntagResourceInput{
		ResourceARN: aws.String("arn:aws:servicediscovery:us-east-1:123456789012:namespace/ns-ylexjili4cdxy3xm"),
		TagKeys: []string{
			"Project",
			"Department",
		},
	}

	req := svc.UntagResourceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeResourceNotFoundException:
				fmt.Println(servicediscovery.ErrCodeResourceNotFoundException, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) UpdateInstanceCustomHealthStatusRequest added in v0.9.0

func (c *Client) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) UpdateInstanceCustomHealthStatusRequest

UpdateInstanceCustomHealthStatusRequest returns a request value for making API operation for AWS Cloud Map.

Submits a request to change the health status of a custom health check to healthy or unhealthy.

You can use UpdateInstanceCustomHealthStatus to change the status only for custom health checks, which you define using HealthCheckCustomConfig when you create a service. You can't use it to change the status for Route 53 health checks, which you define using HealthCheckConfig.

For more information, see HealthCheckCustomConfig (https://docs.aws.amazon.com/cloud-map/latest/api/API_HealthCheckCustomConfig.html).

// Example sending a request using UpdateInstanceCustomHealthStatusRequest.
req := client.UpdateInstanceCustomHealthStatusRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus

Example (Shared00)

UpdateInstanceCustomHealthStatus Example

This example submits a request to change the health status of an instance associated with a service with a custom health check to HEALTHY.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.UpdateInstanceCustomHealthStatusInput{
		InstanceId: aws.String("i-abcd1234"),
		ServiceId:  aws.String("srv-e4anhexample0004"),
		Status:     servicediscovery.CustomHealthStatusHealthy,
	}

	req := svc.UpdateInstanceCustomHealthStatusRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeInstanceNotFound:
				fmt.Println(servicediscovery.ErrCodeInstanceNotFound, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			case servicediscovery.ErrCodeCustomHealthNotFound:
				fmt.Println(servicediscovery.ErrCodeCustomHealthNotFound, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

func (*Client) UpdateServiceRequest added in v0.9.0

func (c *Client) UpdateServiceRequest(input *UpdateServiceInput) UpdateServiceRequest

UpdateServiceRequest returns a request value for making API operation for AWS Cloud Map.

Submits a request to perform the following operations:

  • Update the TTL setting for existing DnsRecords configurations

  • Add, update, or delete HealthCheckConfig for a specified service You can't add, update, or delete a HealthCheckCustomConfig configuration.

For public and private DNS namespaces, note the following:

  • If you omit any existing DnsRecords or HealthCheckConfig configurations from an UpdateService request, the configurations are deleted from the service.

  • If you omit an existing HealthCheckCustomConfig configuration from an UpdateService request, the configuration is not deleted from the service.

When you update settings for a service, AWS Cloud Map also updates the corresponding settings in all the records and health checks that were created by using the specified service.

// Example sending a request using UpdateServiceRequest.
req := client.UpdateServiceRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService

Example (Shared00)

UpdateService Example

This example submits a request to replace the DnsConfig and HealthCheckConfig settings of a specified service.

package main

import (
	"context"
	"fmt"

	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/awserr"
	"github.com/aws/aws-sdk-go-v2/aws/external"
	"github.com/aws/aws-sdk-go-v2/service/servicediscovery"
)

func main() {
	cfg, err := external.LoadDefaultAWSConfig()
	if err != nil {
		panic("failed to load config, " + err.Error())
	}

	svc := servicediscovery.New(cfg)
	input := &servicediscovery.UpdateServiceInput{
		Id: aws.String("srv-e4anhexample0004"),
		Service: &servicediscovery.ServiceChange{
			DnsConfig: &servicediscovery.DnsConfigChange{
				DnsRecords: []servicediscovery.DnsRecord{
					{
						TTL:  aws.Int64(60),
						Type: servicediscovery.RecordTypeA,
					},
				},
			},
			HealthCheckConfig: &servicediscovery.HealthCheckConfig{
				FailureThreshold: aws.Int64(2),
				ResourcePath:     aws.String("/"),
				Type:             servicediscovery.HealthCheckTypeHttp,
			},
		},
	}

	req := svc.UpdateServiceRequest(input)
	result, err := req.Send(context.Background())
	if err != nil {
		if aerr, ok := err.(awserr.Error); ok {
			switch aerr.Code() {
			case servicediscovery.ErrCodeDuplicateRequest:
				fmt.Println(servicediscovery.ErrCodeDuplicateRequest, aerr.Error())
			case servicediscovery.ErrCodeInvalidInput:
				fmt.Println(servicediscovery.ErrCodeInvalidInput, aerr.Error())
			case servicediscovery.ErrCodeServiceNotFound:
				fmt.Println(servicediscovery.ErrCodeServiceNotFound, aerr.Error())
			default:
				fmt.Println(aerr.Error())
			}
		} else {
			// Print the error, cast err to awserr.Error to get the Code and
			// Message from an error.
			fmt.Println(err.Error())
		}
		return
	}

	fmt.Println(result)
}
Output:

type CreateHttpNamespaceInput added in v0.6.0

type CreateHttpNamespaceInput struct {

	// A unique string that identifies the request and that allows failed CreateHttpNamespace
	// requests to be retried without the risk of executing the operation twice.
	// CreatorRequestId can be any unique string, for example, a date/time stamp.
	CreatorRequestId *string `type:"string" idempotencyToken:"true"`

	// A description for the namespace.
	Description *string `type:"string"`

	// The name that you want to assign to this namespace.
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// The tags to add to the namespace. Each tag consists of a key and an optional
	// value, both of which you define. Tag keys can have a maximum character length
	// of 128 characters, and tag values can have a maximum length of 256 characters.
	Tags []Tag `type:"list"`
	// contains filtered or unexported fields
}

func (CreateHttpNamespaceInput) String added in v0.6.0

func (s CreateHttpNamespaceInput) String() string

String returns the string representation

func (*CreateHttpNamespaceInput) Validate added in v0.6.0

func (s *CreateHttpNamespaceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateHttpNamespaceOutput added in v0.6.0

type CreateHttpNamespaceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreateHttpNamespaceOutput) String added in v0.6.0

func (s CreateHttpNamespaceOutput) String() string

String returns the string representation

type CreateHttpNamespaceRequest added in v0.6.0

type CreateHttpNamespaceRequest struct {
	*aws.Request
	Input *CreateHttpNamespaceInput
	Copy  func(*CreateHttpNamespaceInput) CreateHttpNamespaceRequest
}

CreateHttpNamespaceRequest is the request type for the CreateHttpNamespace API operation.

func (CreateHttpNamespaceRequest) Send added in v0.6.0

Send marshals and sends the CreateHttpNamespace API request.

type CreateHttpNamespaceResponse added in v0.9.0

type CreateHttpNamespaceResponse struct {
	*CreateHttpNamespaceOutput
	// contains filtered or unexported fields
}

CreateHttpNamespaceResponse is the response type for the CreateHttpNamespace API operation.

func (*CreateHttpNamespaceResponse) SDKResponseMetdata added in v0.9.0

func (r *CreateHttpNamespaceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateHttpNamespace request.

type CreatePrivateDnsNamespaceInput

type CreatePrivateDnsNamespaceInput struct {

	// A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace
	// requests to be retried without the risk of executing the operation twice.
	// CreatorRequestId can be any unique string, for example, a date/time stamp.
	CreatorRequestId *string `type:"string" idempotencyToken:"true"`

	// A description for the namespace.
	Description *string `type:"string"`

	// The name that you want to assign to this namespace. When you create a private
	// DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private
	// hosted zone that has the same name as the namespace.
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// The tags to add to the namespace. Each tag consists of a key and an optional
	// value, both of which you define. Tag keys can have a maximum character length
	// of 128 characters, and tag values can have a maximum length of 256 characters.
	Tags []Tag `type:"list"`

	// The ID of the Amazon VPC that you want to associate the namespace with.
	//
	// Vpc is a required field
	Vpc *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (CreatePrivateDnsNamespaceInput) String

String returns the string representation

func (*CreatePrivateDnsNamespaceInput) Validate

func (s *CreatePrivateDnsNamespaceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreatePrivateDnsNamespaceOutput

type CreatePrivateDnsNamespaceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreatePrivateDnsNamespaceOutput) String

String returns the string representation

type CreatePrivateDnsNamespaceRequest

type CreatePrivateDnsNamespaceRequest struct {
	*aws.Request
	Input *CreatePrivateDnsNamespaceInput
	Copy  func(*CreatePrivateDnsNamespaceInput) CreatePrivateDnsNamespaceRequest
}

CreatePrivateDnsNamespaceRequest is the request type for the CreatePrivateDnsNamespace API operation.

func (CreatePrivateDnsNamespaceRequest) Send

Send marshals and sends the CreatePrivateDnsNamespace API request.

type CreatePrivateDnsNamespaceResponse added in v0.9.0

type CreatePrivateDnsNamespaceResponse struct {
	*CreatePrivateDnsNamespaceOutput
	// contains filtered or unexported fields
}

CreatePrivateDnsNamespaceResponse is the response type for the CreatePrivateDnsNamespace API operation.

func (*CreatePrivateDnsNamespaceResponse) SDKResponseMetdata added in v0.9.0

func (r *CreatePrivateDnsNamespaceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreatePrivateDnsNamespace request.

type CreatePublicDnsNamespaceInput

type CreatePublicDnsNamespaceInput struct {

	// A unique string that identifies the request and that allows failed CreatePublicDnsNamespace
	// requests to be retried without the risk of executing the operation twice.
	// CreatorRequestId can be any unique string, for example, a date/time stamp.
	CreatorRequestId *string `type:"string" idempotencyToken:"true"`

	// A description for the namespace.
	Description *string `type:"string"`

	// The name that you want to assign to this namespace.
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// The tags to add to the namespace. Each tag consists of a key and an optional
	// value, both of which you define. Tag keys can have a maximum character length
	// of 128 characters, and tag values can have a maximum length of 256 characters.
	Tags []Tag `type:"list"`
	// contains filtered or unexported fields
}

func (CreatePublicDnsNamespaceInput) String

String returns the string representation

func (*CreatePublicDnsNamespaceInput) Validate

func (s *CreatePublicDnsNamespaceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreatePublicDnsNamespaceOutput

type CreatePublicDnsNamespaceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (CreatePublicDnsNamespaceOutput) String

String returns the string representation

type CreatePublicDnsNamespaceRequest

type CreatePublicDnsNamespaceRequest struct {
	*aws.Request
	Input *CreatePublicDnsNamespaceInput
	Copy  func(*CreatePublicDnsNamespaceInput) CreatePublicDnsNamespaceRequest
}

CreatePublicDnsNamespaceRequest is the request type for the CreatePublicDnsNamespace API operation.

func (CreatePublicDnsNamespaceRequest) Send

Send marshals and sends the CreatePublicDnsNamespace API request.

type CreatePublicDnsNamespaceResponse added in v0.9.0

type CreatePublicDnsNamespaceResponse struct {
	*CreatePublicDnsNamespaceOutput
	// contains filtered or unexported fields
}

CreatePublicDnsNamespaceResponse is the response type for the CreatePublicDnsNamespace API operation.

func (*CreatePublicDnsNamespaceResponse) SDKResponseMetdata added in v0.9.0

func (r *CreatePublicDnsNamespaceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreatePublicDnsNamespace request.

type CreateServiceInput

type CreateServiceInput struct {

	// A unique string that identifies the request and that allows failed CreateService
	// requests to be retried without the risk of executing the operation twice.
	// CreatorRequestId can be any unique string, for example, a date/time stamp.
	CreatorRequestId *string `type:"string" idempotencyToken:"true"`

	// A description for the service.
	Description *string `type:"string"`

	// A complex type that contains information about the Amazon Route 53 records
	// that you want AWS Cloud Map to create when you register an instance.
	DnsConfig *DnsConfig `type:"structure"`

	// Public DNS and HTTP namespaces only. A complex type that contains settings
	// for an optional Route 53 health check. If you specify settings for a health
	// check, AWS Cloud Map associates the health check with all the Route 53 DNS
	// records that you specify in DnsConfig.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	//
	// For information about the charges for health checks, see AWS Cloud Map Pricing
	// (http://aws.amazon.com/cloud-map/pricing/).
	HealthCheckConfig *HealthCheckConfig `type:"structure"`

	// A complex type that contains information about an optional custom health
	// check.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	//
	// You can't add, update, or delete a HealthCheckCustomConfig configuration
	// from an existing service.
	HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`

	// The name that you want to assign to the service.
	//
	// If you want AWS Cloud Map to create an SRV record when you register an instance,
	// and if you're using a system that requires a specific SRV format, such as
	// HAProxy (http://www.haproxy.org/), specify the following for Name:
	//
	//    * Start the name with an underscore (_), such as _exampleservice
	//
	//    * End the name with ._protocol, such as ._tcp
	//
	// When you register an instance, AWS Cloud Map creates an SRV record and assigns
	// a name to the record by concatenating the service name and the namespace
	// name, for example:
	//
	// _exampleservice._tcp.example.com
	//
	// Name is a required field
	Name *string `type:"string" required:"true"`

	// The ID of the namespace that you want to use to create the service.
	NamespaceId *string `type:"string"`

	// The tags to add to the service. Each tag consists of a key and an optional
	// value, both of which you define. Tag keys can have a maximum character length
	// of 128 characters, and tag values can have a maximum length of 256 characters.
	Tags []Tag `type:"list"`
	// contains filtered or unexported fields
}

func (CreateServiceInput) String

func (s CreateServiceInput) String() string

String returns the string representation

func (*CreateServiceInput) Validate

func (s *CreateServiceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type CreateServiceOutput

type CreateServiceOutput struct {

	// A complex type that contains information about the new service.
	Service *Service `type:"structure"`
	// contains filtered or unexported fields
}

func (CreateServiceOutput) String

func (s CreateServiceOutput) String() string

String returns the string representation

type CreateServiceRequest

type CreateServiceRequest struct {
	*aws.Request
	Input *CreateServiceInput
	Copy  func(*CreateServiceInput) CreateServiceRequest
}

CreateServiceRequest is the request type for the CreateService API operation.

func (CreateServiceRequest) Send

Send marshals and sends the CreateService API request.

type CreateServiceResponse added in v0.9.0

type CreateServiceResponse struct {
	*CreateServiceOutput
	// contains filtered or unexported fields
}

CreateServiceResponse is the response type for the CreateService API operation.

func (*CreateServiceResponse) SDKResponseMetdata added in v0.9.0

func (r *CreateServiceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateService request.

type CustomHealthStatus added in v0.4.0

type CustomHealthStatus string
const (
	CustomHealthStatusHealthy   CustomHealthStatus = "HEALTHY"
	CustomHealthStatusUnhealthy CustomHealthStatus = "UNHEALTHY"
)

Enum values for CustomHealthStatus

func (CustomHealthStatus) MarshalValue added in v0.4.0

func (enum CustomHealthStatus) MarshalValue() (string, error)

func (CustomHealthStatus) MarshalValueBuf added in v0.4.0

func (enum CustomHealthStatus) MarshalValueBuf(b []byte) ([]byte, error)

type DeleteNamespaceInput

type DeleteNamespaceInput struct {

	// The ID of the namespace that you want to delete.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteNamespaceInput) String

func (s DeleteNamespaceInput) String() string

String returns the string representation

func (*DeleteNamespaceInput) Validate

func (s *DeleteNamespaceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteNamespaceOutput

type DeleteNamespaceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (DeleteNamespaceOutput) String

func (s DeleteNamespaceOutput) String() string

String returns the string representation

type DeleteNamespaceRequest

type DeleteNamespaceRequest struct {
	*aws.Request
	Input *DeleteNamespaceInput
	Copy  func(*DeleteNamespaceInput) DeleteNamespaceRequest
}

DeleteNamespaceRequest is the request type for the DeleteNamespace API operation.

func (DeleteNamespaceRequest) Send

Send marshals and sends the DeleteNamespace API request.

type DeleteNamespaceResponse added in v0.9.0

type DeleteNamespaceResponse struct {
	*DeleteNamespaceOutput
	// contains filtered or unexported fields
}

DeleteNamespaceResponse is the response type for the DeleteNamespace API operation.

func (*DeleteNamespaceResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteNamespaceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteNamespace request.

type DeleteServiceInput

type DeleteServiceInput struct {

	// The ID of the service that you want to delete.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeleteServiceInput) String

func (s DeleteServiceInput) String() string

String returns the string representation

func (*DeleteServiceInput) Validate

func (s *DeleteServiceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeleteServiceOutput

type DeleteServiceOutput struct {
	// contains filtered or unexported fields
}

func (DeleteServiceOutput) String

func (s DeleteServiceOutput) String() string

String returns the string representation

type DeleteServiceRequest

type DeleteServiceRequest struct {
	*aws.Request
	Input *DeleteServiceInput
	Copy  func(*DeleteServiceInput) DeleteServiceRequest
}

DeleteServiceRequest is the request type for the DeleteService API operation.

func (DeleteServiceRequest) Send

Send marshals and sends the DeleteService API request.

type DeleteServiceResponse added in v0.9.0

type DeleteServiceResponse struct {
	*DeleteServiceOutput
	// contains filtered or unexported fields
}

DeleteServiceResponse is the response type for the DeleteService API operation.

func (*DeleteServiceResponse) SDKResponseMetdata added in v0.9.0

func (r *DeleteServiceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeleteService request.

type DeregisterInstanceInput

type DeregisterInstanceInput struct {

	// The value that you specified for Id in the RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html)
	// request.
	//
	// InstanceId is a required field
	InstanceId *string `type:"string" required:"true"`

	// The ID of the service that the instance is associated with.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DeregisterInstanceInput) String

func (s DeregisterInstanceInput) String() string

String returns the string representation

func (*DeregisterInstanceInput) Validate

func (s *DeregisterInstanceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DeregisterInstanceOutput

type DeregisterInstanceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// For more information, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (DeregisterInstanceOutput) String

func (s DeregisterInstanceOutput) String() string

String returns the string representation

type DeregisterInstanceRequest

type DeregisterInstanceRequest struct {
	*aws.Request
	Input *DeregisterInstanceInput
	Copy  func(*DeregisterInstanceInput) DeregisterInstanceRequest
}

DeregisterInstanceRequest is the request type for the DeregisterInstance API operation.

func (DeregisterInstanceRequest) Send

Send marshals and sends the DeregisterInstance API request.

type DeregisterInstanceResponse added in v0.9.0

type DeregisterInstanceResponse struct {
	*DeregisterInstanceOutput
	// contains filtered or unexported fields
}

DeregisterInstanceResponse is the response type for the DeregisterInstance API operation.

func (*DeregisterInstanceResponse) SDKResponseMetdata added in v0.9.0

func (r *DeregisterInstanceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DeregisterInstance request.

type DiscoverInstancesInput added in v0.6.0

type DiscoverInstancesInput struct {

	// The health status of the instances that you want to discover.
	HealthStatus HealthStatusFilter `type:"string" enum:"true"`

	// The maximum number of instances that you want AWS Cloud Map to return in
	// the response to a DiscoverInstances request. If you don't specify a value
	// for MaxResults, AWS Cloud Map returns up to 100 instances.
	MaxResults *int64 `min:"1" type:"integer"`

	// The name of the namespace that you specified when you registered the instance.
	//
	// NamespaceName is a required field
	NamespaceName *string `type:"string" required:"true"`

	// A string map that contains attributes with values that you can use to filter
	// instances by any custom attribute that you specified when you registered
	// the instance. Only instances that match all the specified key/value pairs
	// will be returned.
	QueryParameters map[string]string `type:"map"`

	// The name of the service that you specified when you registered the instance.
	//
	// ServiceName is a required field
	ServiceName *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (DiscoverInstancesInput) String added in v0.6.0

func (s DiscoverInstancesInput) String() string

String returns the string representation

func (*DiscoverInstancesInput) Validate added in v0.6.0

func (s *DiscoverInstancesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DiscoverInstancesOutput added in v0.6.0

type DiscoverInstancesOutput struct {

	// A complex type that contains one HttpInstanceSummary for each registered
	// instance.
	Instances []HttpInstanceSummary `type:"list"`
	// contains filtered or unexported fields
}

func (DiscoverInstancesOutput) String added in v0.6.0

func (s DiscoverInstancesOutput) String() string

String returns the string representation

type DiscoverInstancesRequest added in v0.6.0

type DiscoverInstancesRequest struct {
	*aws.Request
	Input *DiscoverInstancesInput
	Copy  func(*DiscoverInstancesInput) DiscoverInstancesRequest
}

DiscoverInstancesRequest is the request type for the DiscoverInstances API operation.

func (DiscoverInstancesRequest) Send added in v0.6.0

Send marshals and sends the DiscoverInstances API request.

type DiscoverInstancesResponse added in v0.9.0

type DiscoverInstancesResponse struct {
	*DiscoverInstancesOutput
	// contains filtered or unexported fields
}

DiscoverInstancesResponse is the response type for the DiscoverInstances API operation.

func (*DiscoverInstancesResponse) SDKResponseMetdata added in v0.9.0

func (r *DiscoverInstancesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DiscoverInstances request.

type DnsConfig

type DnsConfig struct {

	// An array that contains one DnsRecord object for each Route 53 DNS record
	// that you want AWS Cloud Map to create when you register an instance.
	//
	// DnsRecords is a required field
	DnsRecords []DnsRecord `type:"list" required:"true"`

	// The ID of the namespace to use for DNS configuration.
	NamespaceId *string `deprecated:"true" type:"string"`

	// The routing policy that you want to apply to all Route 53 DNS records that
	// AWS Cloud Map creates when you register an instance and specify this service.
	//
	// If you want to use this service to register instances that create alias records,
	// specify WEIGHTED for the routing policy.
	//
	// You can specify the following values:
	//
	// MULTIVALUE
	//
	// If you define a health check for the service and the health check is healthy,
	// Route 53 returns the applicable value for up to eight instances.
	//
	// For example, suppose the service includes configurations for one A record
	// and a health check, and you use the service to register 10 instances. Route
	// 53 responds to DNS queries with IP addresses for up to eight healthy instances.
	// If fewer than eight instances are healthy, Route 53 responds to every DNS
	// query with the IP addresses for all of the healthy instances.
	//
	// If you don't define a health check for the service, Route 53 assumes that
	// all instances are healthy and returns the values for up to eight instances.
	//
	// For more information about the multivalue routing policy, see Multivalue
	// Answer Routing (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue)
	// in the Route 53 Developer Guide.
	//
	// WEIGHTED
	//
	// Route 53 returns the applicable value from one randomly selected instance
	// from among the instances that you registered using the same service. Currently,
	// all records have the same weight, so you can't route more or less traffic
	// to any instances.
	//
	// For example, suppose the service includes configurations for one A record
	// and a health check, and you use the service to register 10 instances. Route
	// 53 responds to DNS queries with the IP address for one randomly selected
	// instance from among the healthy instances. If no instances are healthy, Route
	// 53 responds to DNS queries as if all of the instances were healthy.
	//
	// If you don't define a health check for the service, Route 53 assumes that
	// all instances are healthy and returns the applicable value for one randomly
	// selected instance.
	//
	// For more information about the weighted routing policy, see Weighted Routing
	// (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted)
	// in the Route 53 Developer Guide.
	RoutingPolicy RoutingPolicy `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about the Amazon Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

func (DnsConfig) String

func (s DnsConfig) String() string

String returns the string representation

func (*DnsConfig) Validate

func (s *DnsConfig) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DnsConfigChange

type DnsConfigChange struct {

	// An array that contains one DnsRecord object for each Route 53 record that
	// you want AWS Cloud Map to create when you register an instance.
	//
	// DnsRecords is a required field
	DnsRecords []DnsRecord `type:"list" required:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about changes to the Route 53 DNS records that AWS Cloud Map creates when you register an instance.

func (DnsConfigChange) String

func (s DnsConfigChange) String() string

String returns the string representation

func (*DnsConfigChange) Validate

func (s *DnsConfigChange) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type DnsProperties

type DnsProperties struct {

	// The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create
	// a namespace.
	HostedZoneId *string `type:"string"`
	// contains filtered or unexported fields
}

A complex type that contains the ID for the Route 53 hosted zone that AWS Cloud Map creates when you create a namespace.

func (DnsProperties) String

func (s DnsProperties) String() string

String returns the string representation

type DnsRecord

type DnsRecord struct {

	// The amount of time, in seconds, that you want DNS resolvers to cache the
	// settings for this record.
	//
	// Alias records don't include a TTL because Route 53 uses the TTL for the AWS
	// resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME
	// attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html)
	// request, the TTL value is ignored. Always specify a TTL for the service;
	// you can use a service to register instances that create either alias or non-alias
	// records.
	//
	// TTL is a required field
	TTL *int64 `type:"long" required:"true"`

	// The type of the resource, which indicates the type of value that Route 53
	// returns in response to DNS queries. You can specify values for Type in the
	// following combinations:
	//
	//    * A
	//
	//    * AAAA
	//
	//    * A and AAAA
	//
	//    * SRV
	//
	//    * CNAME
	//
	// If you want AWS Cloud Map to create a Route 53 alias record when you register
	// an instance, specify A or AAAA for Type.
	//
	// You specify other settings, such as the IP address for A and AAAA records,
	// when you register an instance. For more information, see RegisterInstance
	// (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html).
	//
	// The following values are supported:
	//
	// A
	//
	// Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44.
	//
	// AAAA
	//
	// Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345.
	//
	// CNAME
	//
	// Route 53 returns the domain name of the resource, such as www.example.com.
	// Note the following:
	//
	//    * You specify the domain name that you want to route traffic to when you
	//    register an instance. For more information, see Attributes (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html#cloudmap-RegisterInstance-request-Attributes)
	//    in the topic RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html).
	//
	//    * You must specify WEIGHTED for the value of RoutingPolicy.
	//
	//    * You can't specify both CNAME for Type and settings for HealthCheckConfig.
	//    If you do, the request will fail with an InvalidInput error.
	//
	// SRV
	//
	// Route 53 returns the value for an SRV record. The value for an SRV record
	// uses the following values:
	//
	// priority weight port service-hostname
	//
	// Note the following about the values:
	//
	//    * The values of priority and weight are both set to 1 and can't be changed.
	//
	//    * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT
	//    attribute when you submit a RegisterInstance (https://docs.aws.amazon.com/cloud-map/latest/api/API_RegisterInstance.html)
	//    request.
	//
	//    * The value of service-hostname is a concatenation of the following values:
	//    The value that you specify for InstanceId when you register an instance.
	//    The name of the service. The name of the namespace. For example, if the
	//    value of InstanceId is test, the name of the service is backend, and the
	//    name of the namespace is example.com, the value of service-hostname is:
	//    test.backend.example.com
	//
	// If you specify settings for an SRV record, note the following:
	//
	//    * If you specify values for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both
	//    in the RegisterInstance request, AWS Cloud Map automatically creates A
	//    and/or AAAA records that have the same name as the value of service-hostname
	//    in the SRV record. You can ignore these records.
	//
	//    * If you're using a system that requires a specific SRV format, such as
	//    HAProxy, see the Name (https://docs.aws.amazon.com/cloud-map/latest/api/API_CreateService.html#cloudmap-CreateService-request-Name)
	//    element in the documentation about CreateService for information about
	//    how to specify the correct name format.
	//
	// Type is a required field
	Type RecordType `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about the Route 53 DNS records that you want AWS Cloud Map to create when you register an instance.

func (DnsRecord) String

func (s DnsRecord) String() string

String returns the string representation

func (*DnsRecord) Validate

func (s *DnsRecord) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type FilterCondition

type FilterCondition string
const (
	FilterConditionEq      FilterCondition = "EQ"
	FilterConditionIn      FilterCondition = "IN"
	FilterConditionBetween FilterCondition = "BETWEEN"
)

Enum values for FilterCondition

func (FilterCondition) MarshalValue added in v0.3.0

func (enum FilterCondition) MarshalValue() (string, error)

func (FilterCondition) MarshalValueBuf added in v0.3.0

func (enum FilterCondition) MarshalValueBuf(b []byte) ([]byte, error)

type GetInstanceInput

type GetInstanceInput struct {

	// The ID of the instance that you want to get information about.
	//
	// InstanceId is a required field
	InstanceId *string `type:"string" required:"true"`

	// The ID of the service that the instance is associated with.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetInstanceInput) String

func (s GetInstanceInput) String() string

String returns the string representation

func (*GetInstanceInput) Validate

func (s *GetInstanceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetInstanceOutput

type GetInstanceOutput struct {

	// A complex type that contains information about a specified instance.
	Instance *Instance `type:"structure"`
	// contains filtered or unexported fields
}

func (GetInstanceOutput) String

func (s GetInstanceOutput) String() string

String returns the string representation

type GetInstanceRequest

type GetInstanceRequest struct {
	*aws.Request
	Input *GetInstanceInput
	Copy  func(*GetInstanceInput) GetInstanceRequest
}

GetInstanceRequest is the request type for the GetInstance API operation.

func (GetInstanceRequest) Send

Send marshals and sends the GetInstance API request.

type GetInstanceResponse added in v0.9.0

type GetInstanceResponse struct {
	*GetInstanceOutput
	// contains filtered or unexported fields
}

GetInstanceResponse is the response type for the GetInstance API operation.

func (*GetInstanceResponse) SDKResponseMetdata added in v0.9.0

func (r *GetInstanceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetInstance request.

type GetInstancesHealthStatusInput

type GetInstancesHealthStatusInput struct {

	// An array that contains the IDs of all the instances that you want to get
	// the health status for.
	//
	// If you omit Instances, AWS Cloud Map returns the health status for all the
	// instances that are associated with the specified service.
	//
	// To get the IDs for the instances that you've registered by using a specified
	// service, submit a ListInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListInstances.html)
	// request.
	Instances []string `min:"1" type:"list"`

	// The maximum number of instances that you want AWS Cloud Map to return in
	// the response to a GetInstancesHealthStatus request. If you don't specify
	// a value for MaxResults, AWS Cloud Map returns up to 100 instances.
	MaxResults *int64 `min:"1" type:"integer"`

	// For the first GetInstancesHealthStatus request, omit this value.
	//
	// If more than MaxResults instances match the specified criteria, you can submit
	// another GetInstancesHealthStatus request to get the next group of results.
	// Specify the value of NextToken from the previous response in the next request.
	NextToken *string `type:"string"`

	// The ID of the service that the instance is associated with.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetInstancesHealthStatusInput) String

String returns the string representation

func (*GetInstancesHealthStatusInput) Validate

func (s *GetInstancesHealthStatusInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetInstancesHealthStatusOutput

type GetInstancesHealthStatusOutput struct {

	// If more than MaxResults instances match the specified criteria, you can submit
	// another GetInstancesHealthStatus request to get the next group of results.
	// Specify the value of NextToken from the previous response in the next request.
	NextToken *string `type:"string"`

	// A complex type that contains the IDs and the health status of the instances
	// that you specified in the GetInstancesHealthStatus request.
	Status map[string]HealthStatus `type:"map"`
	// contains filtered or unexported fields
}

func (GetInstancesHealthStatusOutput) String

String returns the string representation

type GetInstancesHealthStatusPaginator added in v0.9.0

type GetInstancesHealthStatusPaginator struct {
	aws.Pager
}

GetInstancesHealthStatusPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewGetInstancesHealthStatusPaginator added in v0.9.0

func NewGetInstancesHealthStatusPaginator(req GetInstancesHealthStatusRequest) GetInstancesHealthStatusPaginator

NewGetInstancesHealthStatusRequestPaginator returns a paginator for GetInstancesHealthStatus. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.GetInstancesHealthStatusRequest(input)
p := servicediscovery.NewGetInstancesHealthStatusRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*GetInstancesHealthStatusPaginator) CurrentPage added in v0.9.0

type GetInstancesHealthStatusRequest

type GetInstancesHealthStatusRequest struct {
	*aws.Request
	Input *GetInstancesHealthStatusInput
	Copy  func(*GetInstancesHealthStatusInput) GetInstancesHealthStatusRequest
}

GetInstancesHealthStatusRequest is the request type for the GetInstancesHealthStatus API operation.

func (GetInstancesHealthStatusRequest) Send

Send marshals and sends the GetInstancesHealthStatus API request.

type GetInstancesHealthStatusResponse added in v0.9.0

type GetInstancesHealthStatusResponse struct {
	*GetInstancesHealthStatusOutput
	// contains filtered or unexported fields
}

GetInstancesHealthStatusResponse is the response type for the GetInstancesHealthStatus API operation.

func (*GetInstancesHealthStatusResponse) SDKResponseMetdata added in v0.9.0

func (r *GetInstancesHealthStatusResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetInstancesHealthStatus request.

type GetNamespaceInput

type GetNamespaceInput struct {

	// The ID of the namespace that you want to get information about.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetNamespaceInput) String

func (s GetNamespaceInput) String() string

String returns the string representation

func (*GetNamespaceInput) Validate

func (s *GetNamespaceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetNamespaceOutput

type GetNamespaceOutput struct {

	// A complex type that contains information about the specified namespace.
	Namespace *Namespace `type:"structure"`
	// contains filtered or unexported fields
}

func (GetNamespaceOutput) String

func (s GetNamespaceOutput) String() string

String returns the string representation

type GetNamespaceRequest

type GetNamespaceRequest struct {
	*aws.Request
	Input *GetNamespaceInput
	Copy  func(*GetNamespaceInput) GetNamespaceRequest
}

GetNamespaceRequest is the request type for the GetNamespace API operation.

func (GetNamespaceRequest) Send

Send marshals and sends the GetNamespace API request.

type GetNamespaceResponse added in v0.9.0

type GetNamespaceResponse struct {
	*GetNamespaceOutput
	// contains filtered or unexported fields
}

GetNamespaceResponse is the response type for the GetNamespace API operation.

func (*GetNamespaceResponse) SDKResponseMetdata added in v0.9.0

func (r *GetNamespaceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetNamespace request.

type GetOperationInput

type GetOperationInput struct {

	// The ID of the operation that you want to get more information about.
	//
	// OperationId is a required field
	OperationId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetOperationInput) String

func (s GetOperationInput) String() string

String returns the string representation

func (*GetOperationInput) Validate

func (s *GetOperationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetOperationOutput

type GetOperationOutput struct {

	// A complex type that contains information about the operation.
	Operation *Operation `type:"structure"`
	// contains filtered or unexported fields
}

func (GetOperationOutput) String

func (s GetOperationOutput) String() string

String returns the string representation

type GetOperationRequest

type GetOperationRequest struct {
	*aws.Request
	Input *GetOperationInput
	Copy  func(*GetOperationInput) GetOperationRequest
}

GetOperationRequest is the request type for the GetOperation API operation.

func (GetOperationRequest) Send

Send marshals and sends the GetOperation API request.

type GetOperationResponse added in v0.9.0

type GetOperationResponse struct {
	*GetOperationOutput
	// contains filtered or unexported fields
}

GetOperationResponse is the response type for the GetOperation API operation.

func (*GetOperationResponse) SDKResponseMetdata added in v0.9.0

func (r *GetOperationResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetOperation request.

type GetServiceInput

type GetServiceInput struct {

	// The ID of the service that you want to get settings for.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (GetServiceInput) String

func (s GetServiceInput) String() string

String returns the string representation

func (*GetServiceInput) Validate

func (s *GetServiceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetServiceOutput

type GetServiceOutput struct {

	// A complex type that contains information about the service.
	Service *Service `type:"structure"`
	// contains filtered or unexported fields
}

func (GetServiceOutput) String

func (s GetServiceOutput) String() string

String returns the string representation

type GetServiceRequest

type GetServiceRequest struct {
	*aws.Request
	Input *GetServiceInput
	Copy  func(*GetServiceInput) GetServiceRequest
}

GetServiceRequest is the request type for the GetService API operation.

func (GetServiceRequest) Send

Send marshals and sends the GetService API request.

type GetServiceResponse added in v0.9.0

type GetServiceResponse struct {
	*GetServiceOutput
	// contains filtered or unexported fields
}

GetServiceResponse is the response type for the GetService API operation.

func (*GetServiceResponse) SDKResponseMetdata added in v0.9.0

func (r *GetServiceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetService request.

type HealthCheckConfig

type HealthCheckConfig struct {

	// The number of consecutive health checks that an endpoint must pass or fail
	// for Route 53 to change the current status of the endpoint from unhealthy
	// to healthy or vice versa. For more information, see How Route 53 Determines
	// Whether an Endpoint Is Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html)
	// in the Route 53 Developer Guide.
	FailureThreshold *int64 `min:"1" type:"integer"`

	// The path that you want Route 53 to request when performing health checks.
	// The path can be any value for which your endpoint will return an HTTP status
	// code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html.
	// Route 53 automatically adds the DNS name for the service. If you don't specify
	// a value for ResourcePath, the default value is /.
	//
	// If you specify TCP for Type, you must not specify a value for ResourcePath.
	ResourcePath *string `type:"string"`

	// The type of health check that you want to create, which indicates how Route
	// 53 determines whether an endpoint is healthy.
	//
	// You can't change the value of Type after you create a health check.
	//
	// You can create the following types of health checks:
	//
	//    * HTTP: Route 53 tries to establish a TCP connection. If successful, Route
	//    53 submits an HTTP request and waits for an HTTP status code of 200 or
	//    greater and less than 400.
	//
	//    * HTTPS: Route 53 tries to establish a TCP connection. If successful,
	//    Route 53 submits an HTTPS request and waits for an HTTP status code of
	//    200 or greater and less than 400. If you specify HTTPS for the value of
	//    Type, the endpoint must support TLS v1.0 or later.
	//
	//    * TCP: Route 53 tries to establish a TCP connection. If you specify TCP
	//    for Type, don't specify a value for ResourcePath.
	//
	// For more information, see How Route 53 Determines Whether an Endpoint Is
	// Healthy (https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html)
	// in the Route 53 Developer Guide.
	//
	// Type is a required field
	Type HealthCheckType `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

Public DNS and HTTP namespaces only. A complex type that contains settings for an optional health check. If you specify settings for a health check, AWS Cloud Map associates the health check with the records that you specify in DnsConfig.

If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.

Health checks are basic Route 53 health checks that monitor an AWS endpoint. For information about pricing for health checks, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/).

Note the following about configuring health checks.

A and AAAA records

If DnsConfig includes configurations for both A and AAAA records, AWS Cloud Map creates a health check that uses the IPv4 address to check the health of the resource. If the endpoint that is specified by the IPv4 address is unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.

CNAME records

You can't specify settings for HealthCheckConfig when the DNSConfig includes CNAME for the value of Type. If you do, the CreateService request will fail with an InvalidInput error.

Request interval

A Route 53 health checker in each health-checking region sends a health check request to an endpoint every 30 seconds. On average, your endpoint receives a health check request about every two seconds. However, health checkers don't coordinate with one another, so you'll sometimes see several requests per second followed by a few seconds with no health checks at all.

Health checking regions

Health checkers perform checks from all Route 53 health-checking regions. For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).

Alias records

When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, AWS Cloud Map creates a Route 53 alias record. Note the following:

Charges for health checks

Health checks are basic Route 53 health checks that monitor an AWS endpoint. For information about pricing for health checks, see Amazon Route 53 Pricing (http://aws.amazon.com/route53/pricing/).

func (HealthCheckConfig) String

func (s HealthCheckConfig) String() string

String returns the string representation

func (*HealthCheckConfig) Validate

func (s *HealthCheckConfig) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type HealthCheckCustomConfig added in v0.4.0

type HealthCheckCustomConfig struct {

	// The number of 30-second intervals that you want AWS Cloud Map to wait after
	// receiving an UpdateInstanceCustomHealthStatus request before it changes the
	// health status of a service instance. For example, suppose you specify a value
	// of 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus
	// request. AWS Cloud Map waits for approximately 60 seconds (2 x 30) before
	// changing the status of the service instance based on that request.
	//
	// Sending a second or subsequent UpdateInstanceCustomHealthStatus request with
	// the same value before FailureThreshold x 30 seconds has passed doesn't accelerate
	// the change. AWS Cloud Map still waits FailureThreshold x 30 seconds after
	// the first request to make the change.
	FailureThreshold *int64 `min:"1" type:"integer"`
	// contains filtered or unexported fields
}

A complex type that contains information about an optional custom health check. A custom health check, which requires that you use a third-party health checker to evaluate the health of your resources, is useful in the following circumstances:

  • You can't use a health check that is defined by HealthCheckConfig because the resource isn't available over the internet. For example, you can use a custom health check when the instance is in an Amazon VPC. (To check the health of resources in a VPC, the health checker must also be in the VPC.)

  • You want to use a third-party health checker regardless of where your resources are.

If you specify a health check configuration, you can specify either HealthCheckCustomConfig or HealthCheckConfig but not both.

To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus request. AWS Cloud Map doesn't monitor the status of the resource, it just keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus request.

Here's how custom health checks work:

You create a service and specify a value for FailureThreshold.

The failure threshold indicates the number of 30-second intervals you want AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html) request and the time that AWS Cloud Map stops routing internet traffic to the corresponding resource.

You register an instance.

You configure a third-party health checker to monitor the resource that is associated with the new instance.

AWS Cloud Map doesn't check the health of the resource directly.

The third-party health-checker determines that the resource is unhealthy and notifies your application.

Your application submits an UpdateInstanceCustomHealthStatus request.

AWS Cloud Map waits for (FailureThreshold x 30) seconds.

If another UpdateInstanceCustomHealthStatus request doesn't arrive during that time to change the status back to healthy, AWS Cloud Map stops routing traffic to the resource.

func (HealthCheckCustomConfig) String added in v0.4.0

func (s HealthCheckCustomConfig) String() string

String returns the string representation

func (*HealthCheckCustomConfig) Validate added in v0.4.0

func (s *HealthCheckCustomConfig) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type HealthCheckType

type HealthCheckType string
const (
	HealthCheckTypeHttp  HealthCheckType = "HTTP"
	HealthCheckTypeHttps HealthCheckType = "HTTPS"
	HealthCheckTypeTcp   HealthCheckType = "TCP"
)

Enum values for HealthCheckType

func (HealthCheckType) MarshalValue added in v0.3.0

func (enum HealthCheckType) MarshalValue() (string, error)

func (HealthCheckType) MarshalValueBuf added in v0.3.0

func (enum HealthCheckType) MarshalValueBuf(b []byte) ([]byte, error)

type HealthStatus

type HealthStatus string
const (
	HealthStatusHealthy   HealthStatus = "HEALTHY"
	HealthStatusUnhealthy HealthStatus = "UNHEALTHY"
	HealthStatusUnknown   HealthStatus = "UNKNOWN"
)

Enum values for HealthStatus

func (HealthStatus) MarshalValue added in v0.3.0

func (enum HealthStatus) MarshalValue() (string, error)

func (HealthStatus) MarshalValueBuf added in v0.3.0

func (enum HealthStatus) MarshalValueBuf(b []byte) ([]byte, error)

type HealthStatusFilter added in v0.6.0

type HealthStatusFilter string
const (
	HealthStatusFilterHealthy   HealthStatusFilter = "HEALTHY"
	HealthStatusFilterUnhealthy HealthStatusFilter = "UNHEALTHY"
	HealthStatusFilterAll       HealthStatusFilter = "ALL"
)

Enum values for HealthStatusFilter

func (HealthStatusFilter) MarshalValue added in v0.6.0

func (enum HealthStatusFilter) MarshalValue() (string, error)

func (HealthStatusFilter) MarshalValueBuf added in v0.6.0

func (enum HealthStatusFilter) MarshalValueBuf(b []byte) ([]byte, error)

type HttpInstanceSummary added in v0.6.0

type HttpInstanceSummary struct {

	// If you included any attributes when you registered the instance, the values
	// of those attributes.
	Attributes map[string]string `type:"map"`

	// If you configured health checking in the service, the current health status
	// of the service instance.
	HealthStatus HealthStatus `type:"string" enum:"true"`

	// The ID of an instance that matches the values that you specified in the request.
	InstanceId *string `type:"string"`

	// The name of the namespace that you specified when you registered the instance.
	NamespaceName *string `type:"string"`

	// The name of the service that you specified when you registered the instance.
	ServiceName *string `type:"string"`
	// contains filtered or unexported fields
}

In a response to a DiscoverInstances (https://docs.aws.amazon.com/cloud-map/latest/api/API_DiscoverInstances.html) request, HttpInstanceSummary contains information about one instance that matches the values that you specified in the request.

func (HttpInstanceSummary) String added in v0.6.0

func (s HttpInstanceSummary) String() string

String returns the string representation

type HttpProperties added in v0.6.0

type HttpProperties struct {

	// The name of an HTTP namespace.
	HttpName *string `type:"string"`
	// contains filtered or unexported fields
}

A complex type that contains the name of an HTTP namespace.

func (HttpProperties) String added in v0.6.0

func (s HttpProperties) String() string

String returns the string representation

type Instance

type Instance struct {

	// A string map that contains the following information for the service that
	// you specify in ServiceId:
	//
	//    * The attributes that apply to the records that are defined in the service.
	//
	//    * For each attribute, the applicable value.
	//
	// Supported attribute keys include the following:
	//
	// AWS_ALIAS_DNS_NAME
	//
	// If you want AWS Cloud Map to create a Route 53 alias record that routes traffic
	// to an Elastic Load Balancing load balancer, specify the DNS name that is
	// associated with the load balancer. For information about how to get the DNS
	// name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html).
	//
	// Note the following:
	//
	//    * The configuration for the service that is specified by ServiceId must
	//    include settings for an A record, an AAAA record, or both.
	//
	//    * In the service that is specified by ServiceId, the value of RoutingPolicy
	//    must be WEIGHTED.
	//
	//    * If the service that is specified by ServiceId includes HealthCheckConfig
	//    settings, AWS Cloud Map will create the health check, but it won't associate
	//    the health check with the alias record.
	//
	//    * Auto naming currently doesn't support creating alias records that route
	//    traffic to AWS resources other than ELB load balancers.
	//
	//    * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values
	//    for any of the AWS_INSTANCE attributes.
	//
	// AWS_INSTANCE_CNAME
	//
	// If the service configuration includes a CNAME record, the domain name that
	// you want Route 53 to return in response to DNS queries, for example, example.com.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an CNAME record.
	//
	// AWS_INSTANCE_IPV4
	//
	// If the service configuration includes an A record, the IPv4 address that
	// you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an A record. If the service includes settings for an SRV record, you
	// must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
	//
	// AWS_INSTANCE_IPV6
	//
	// If the service configuration includes an AAAA record, the IPv6 address that
	// you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an AAAA record. If the service includes settings for an SRV record, you
	// must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
	//
	// AWS_INSTANCE_PORT
	//
	// If the service includes an SRV record, the value that you want Route 53 to
	// return for the port.
	//
	// If the service includes HealthCheckConfig, the port on the endpoint that
	// you want Route 53 to send requests to.
	//
	// This value is required if you specified settings for an SRV record or a Route
	// 53 health check when you created the service.
	Attributes map[string]string `type:"map"`

	// A unique string that identifies the request and that allows failed RegisterInstance
	// requests to be retried without the risk of executing the operation twice.
	// You must use a unique CreatorRequestId string every time you submit a RegisterInstance
	// request if you're registering additional instances for the same namespace
	// and service. CreatorRequestId can be any unique string, for example, a date/time
	// stamp.
	CreatorRequestId *string `type:"string"`

	// An identifier that you want to associate with the instance. Note the following:
	//
	//    * If the service that is specified by ServiceId includes settings for
	//    an SRV record, the value of InstanceId is automatically included as part
	//    of the value for the SRV record. For more information, see DnsRecord >
	//    Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type).
	//
	//    * You can use this value to update an existing instance.
	//
	//    * To register a new instance, you must specify a value that is unique
	//    among instances that you register by using the same service.
	//
	//    * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates
	//    the existing DNS records. If there's also an existing health check, AWS
	//    Cloud Map deletes the old health check and creates a new one. The health
	//    check isn't deleted immediately, so it will still appear for a while if
	//    you submit a ListHealthChecks request, for example.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about an instance that AWS Cloud Map creates when you submit a RegisterInstance request.

func (Instance) String

func (s Instance) String() string

String returns the string representation

type InstanceSummary

type InstanceSummary struct {

	// A string map that contains the following information:
	//
	//    * The attributes that are associate with the instance.
	//
	//    * For each attribute, the applicable value.
	//
	// Supported attribute keys include the following:
	//
	//    * AWS_ALIAS_DNS_NAME: For an alias record that routes traffic to an Elastic
	//    Load Balancing load balancer, the DNS name that is associated with the
	//    load balancer.
	//
	//    * AWS_INSTANCE_CNAME: For a CNAME record, the domain name that Route 53
	//    returns in response to DNS queries, for example, example.com.
	//
	//    * AWS_INSTANCE_IPV4: For an A record, the IPv4 address that Route 53 returns
	//    in response to DNS queries, for example, 192.0.2.44.
	//
	//    * AWS_INSTANCE_IPV6: For an AAAA record, the IPv6 address that Route 53
	//    returns in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
	//
	//    * AWS_INSTANCE_PORT: For an SRV record, the value that Route 53 returns
	//    for the port. In addition, if the service includes HealthCheckConfig,
	//    the port on the endpoint that Route 53 sends requests to.
	Attributes map[string]string `type:"map"`

	// The ID for an instance that you created by using a specified service.
	Id *string `type:"string"`
	// contains filtered or unexported fields
}

A complex type that contains information about the instances that you registered by using a specified service.

func (InstanceSummary) String

func (s InstanceSummary) String() string

String returns the string representation

type ListInstancesInput

type ListInstancesInput struct {

	// The maximum number of instances that you want AWS Cloud Map to return in
	// the response to a ListInstances request. If you don't specify a value for
	// MaxResults, AWS Cloud Map returns up to 100 instances.
	MaxResults *int64 `min:"1" type:"integer"`

	// For the first ListInstances request, omit this value.
	//
	// If more than MaxResults instances match the specified criteria, you can submit
	// another ListInstances request to get the next group of results. Specify the
	// value of NextToken from the previous response in the next request.
	NextToken *string `type:"string"`

	// The ID of the service that you want to list instances for.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (ListInstancesInput) String

func (s ListInstancesInput) String() string

String returns the string representation

func (*ListInstancesInput) Validate

func (s *ListInstancesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListInstancesOutput

type ListInstancesOutput struct {

	// Summary information about the instances that are associated with the specified
	// service.
	Instances []InstanceSummary `type:"list"`

	// If more than MaxResults instances match the specified criteria, you can submit
	// another ListInstances request to get the next group of results. Specify the
	// value of NextToken from the previous response in the next request.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListInstancesOutput) String

func (s ListInstancesOutput) String() string

String returns the string representation

type ListInstancesPaginator added in v0.9.0

type ListInstancesPaginator struct {
	aws.Pager
}

ListInstancesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListInstancesPaginator added in v0.9.0

func NewListInstancesPaginator(req ListInstancesRequest) ListInstancesPaginator

NewListInstancesRequestPaginator returns a paginator for ListInstances. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListInstancesRequest(input)
p := servicediscovery.NewListInstancesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListInstancesPaginator) CurrentPage added in v0.9.0

func (p *ListInstancesPaginator) CurrentPage() *ListInstancesOutput

type ListInstancesRequest

type ListInstancesRequest struct {
	*aws.Request
	Input *ListInstancesInput
	Copy  func(*ListInstancesInput) ListInstancesRequest
}

ListInstancesRequest is the request type for the ListInstances API operation.

func (ListInstancesRequest) Send

Send marshals and sends the ListInstances API request.

type ListInstancesResponse added in v0.9.0

type ListInstancesResponse struct {
	*ListInstancesOutput
	// contains filtered or unexported fields
}

ListInstancesResponse is the response type for the ListInstances API operation.

func (*ListInstancesResponse) SDKResponseMetdata added in v0.9.0

func (r *ListInstancesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListInstances request.

type ListNamespacesInput

type ListNamespacesInput struct {

	// A complex type that contains specifications for the namespaces that you want
	// to list.
	//
	// If you specify more than one filter, a namespace must match all filters to
	// be returned by ListNamespaces.
	Filters []NamespaceFilter `type:"list"`

	// The maximum number of namespaces that you want AWS Cloud Map to return in
	// the response to a ListNamespaces request. If you don't specify a value for
	// MaxResults, AWS Cloud Map returns up to 100 namespaces.
	MaxResults *int64 `min:"1" type:"integer"`

	// For the first ListNamespaces request, omit this value.
	//
	// If the response contains NextToken, submit another ListNamespaces request
	// to get the next group of results. Specify the value of NextToken from the
	// previous response in the next request.
	//
	// AWS Cloud Map gets MaxResults namespaces and then filters them based on the
	// specified criteria. It's possible that no namespaces in the first MaxResults
	// namespaces matched the specified criteria but that subsequent groups of MaxResults
	// namespaces do contain namespaces that match the criteria.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListNamespacesInput) String

func (s ListNamespacesInput) String() string

String returns the string representation

func (*ListNamespacesInput) Validate

func (s *ListNamespacesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListNamespacesOutput

type ListNamespacesOutput struct {

	// An array that contains one NamespaceSummary object for each namespace that
	// matches the specified filter criteria.
	Namespaces []NamespaceSummary `type:"list"`

	// If the response contains NextToken, submit another ListNamespaces request
	// to get the next group of results. Specify the value of NextToken from the
	// previous response in the next request.
	//
	// AWS Cloud Map gets MaxResults namespaces and then filters them based on the
	// specified criteria. It's possible that no namespaces in the first MaxResults
	// namespaces matched the specified criteria but that subsequent groups of MaxResults
	// namespaces do contain namespaces that match the criteria.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListNamespacesOutput) String

func (s ListNamespacesOutput) String() string

String returns the string representation

type ListNamespacesPaginator added in v0.9.0

type ListNamespacesPaginator struct {
	aws.Pager
}

ListNamespacesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListNamespacesPaginator added in v0.9.0

func NewListNamespacesPaginator(req ListNamespacesRequest) ListNamespacesPaginator

NewListNamespacesRequestPaginator returns a paginator for ListNamespaces. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListNamespacesRequest(input)
p := servicediscovery.NewListNamespacesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListNamespacesPaginator) CurrentPage added in v0.9.0

type ListNamespacesRequest

type ListNamespacesRequest struct {
	*aws.Request
	Input *ListNamespacesInput
	Copy  func(*ListNamespacesInput) ListNamespacesRequest
}

ListNamespacesRequest is the request type for the ListNamespaces API operation.

func (ListNamespacesRequest) Send

Send marshals and sends the ListNamespaces API request.

type ListNamespacesResponse added in v0.9.0

type ListNamespacesResponse struct {
	*ListNamespacesOutput
	// contains filtered or unexported fields
}

ListNamespacesResponse is the response type for the ListNamespaces API operation.

func (*ListNamespacesResponse) SDKResponseMetdata added in v0.9.0

func (r *ListNamespacesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListNamespaces request.

type ListOperationsInput

type ListOperationsInput struct {

	// A complex type that contains specifications for the operations that you want
	// to list, for example, operations that you started between a specified start
	// date and end date.
	//
	// If you specify more than one filter, an operation must match all filters
	// to be returned by ListOperations.
	Filters []OperationFilter `type:"list"`

	// The maximum number of items that you want AWS Cloud Map to return in the
	// response to a ListOperations request. If you don't specify a value for MaxResults,
	// AWS Cloud Map returns up to 100 operations.
	MaxResults *int64 `min:"1" type:"integer"`

	// For the first ListOperations request, omit this value.
	//
	// If the response contains NextToken, submit another ListOperations request
	// to get the next group of results. Specify the value of NextToken from the
	// previous response in the next request.
	//
	// AWS Cloud Map gets MaxResults operations and then filters them based on the
	// specified criteria. It's possible that no operations in the first MaxResults
	// operations matched the specified criteria but that subsequent groups of MaxResults
	// operations do contain operations that match the criteria.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListOperationsInput) String

func (s ListOperationsInput) String() string

String returns the string representation

func (*ListOperationsInput) Validate

func (s *ListOperationsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListOperationsOutput

type ListOperationsOutput struct {

	// If the response contains NextToken, submit another ListOperations request
	// to get the next group of results. Specify the value of NextToken from the
	// previous response in the next request.
	//
	// AWS Cloud Map gets MaxResults operations and then filters them based on the
	// specified criteria. It's possible that no operations in the first MaxResults
	// operations matched the specified criteria but that subsequent groups of MaxResults
	// operations do contain operations that match the criteria.
	NextToken *string `type:"string"`

	// Summary information about the operations that match the specified criteria.
	Operations []OperationSummary `type:"list"`
	// contains filtered or unexported fields
}

func (ListOperationsOutput) String

func (s ListOperationsOutput) String() string

String returns the string representation

type ListOperationsPaginator added in v0.9.0

type ListOperationsPaginator struct {
	aws.Pager
}

ListOperationsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListOperationsPaginator added in v0.9.0

func NewListOperationsPaginator(req ListOperationsRequest) ListOperationsPaginator

NewListOperationsRequestPaginator returns a paginator for ListOperations. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListOperationsRequest(input)
p := servicediscovery.NewListOperationsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListOperationsPaginator) CurrentPage added in v0.9.0

type ListOperationsRequest

type ListOperationsRequest struct {
	*aws.Request
	Input *ListOperationsInput
	Copy  func(*ListOperationsInput) ListOperationsRequest
}

ListOperationsRequest is the request type for the ListOperations API operation.

func (ListOperationsRequest) Send

Send marshals and sends the ListOperations API request.

type ListOperationsResponse added in v0.9.0

type ListOperationsResponse struct {
	*ListOperationsOutput
	// contains filtered or unexported fields
}

ListOperationsResponse is the response type for the ListOperations API operation.

func (*ListOperationsResponse) SDKResponseMetdata added in v0.9.0

func (r *ListOperationsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListOperations request.

type ListServicesInput

type ListServicesInput struct {

	// A complex type that contains specifications for the namespaces that you want
	// to list services for.
	//
	// If you specify more than one filter, an operation must match all filters
	// to be returned by ListServices.
	Filters []ServiceFilter `type:"list"`

	// The maximum number of services that you want AWS Cloud Map to return in the
	// response to a ListServices request. If you don't specify a value for MaxResults,
	// AWS Cloud Map returns up to 100 services.
	MaxResults *int64 `min:"1" type:"integer"`

	// For the first ListServices request, omit this value.
	//
	// If the response contains NextToken, submit another ListServices request to
	// get the next group of results. Specify the value of NextToken from the previous
	// response in the next request.
	//
	// AWS Cloud Map gets MaxResults services and then filters them based on the
	// specified criteria. It's possible that no services in the first MaxResults
	// services matched the specified criteria but that subsequent groups of MaxResults
	// services do contain services that match the criteria.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (ListServicesInput) String

func (s ListServicesInput) String() string

String returns the string representation

func (*ListServicesInput) Validate

func (s *ListServicesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListServicesOutput

type ListServicesOutput struct {

	// If the response contains NextToken, submit another ListServices request to
	// get the next group of results. Specify the value of NextToken from the previous
	// response in the next request.
	//
	// AWS Cloud Map gets MaxResults services and then filters them based on the
	// specified criteria. It's possible that no services in the first MaxResults
	// services matched the specified criteria but that subsequent groups of MaxResults
	// services do contain services that match the criteria.
	NextToken *string `type:"string"`

	// An array that contains one ServiceSummary object for each service that matches
	// the specified filter criteria.
	Services []ServiceSummary `type:"list"`
	// contains filtered or unexported fields
}

func (ListServicesOutput) String

func (s ListServicesOutput) String() string

String returns the string representation

type ListServicesPaginator added in v0.9.0

type ListServicesPaginator struct {
	aws.Pager
}

ListServicesPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewListServicesPaginator added in v0.9.0

func NewListServicesPaginator(req ListServicesRequest) ListServicesPaginator

NewListServicesRequestPaginator returns a paginator for ListServices. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

Note: This operation can generate multiple requests to a service.

// Example iterating over pages.
req := client.ListServicesRequest(input)
p := servicediscovery.NewListServicesRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*ListServicesPaginator) CurrentPage added in v0.9.0

func (p *ListServicesPaginator) CurrentPage() *ListServicesOutput

type ListServicesRequest

type ListServicesRequest struct {
	*aws.Request
	Input *ListServicesInput
	Copy  func(*ListServicesInput) ListServicesRequest
}

ListServicesRequest is the request type for the ListServices API operation.

func (ListServicesRequest) Send

Send marshals and sends the ListServices API request.

type ListServicesResponse added in v0.9.0

type ListServicesResponse struct {
	*ListServicesOutput
	// contains filtered or unexported fields
}

ListServicesResponse is the response type for the ListServices API operation.

func (*ListServicesResponse) SDKResponseMetdata added in v0.9.0

func (r *ListServicesResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListServices request.

type ListTagsForResourceInput added in v0.24.0

type ListTagsForResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource that you want to retrieve
	// tags for.
	//
	// ResourceARN is a required field
	ResourceARN *string `min:"1" type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (ListTagsForResourceInput) String added in v0.24.0

func (s ListTagsForResourceInput) String() string

String returns the string representation

func (*ListTagsForResourceInput) Validate added in v0.24.0

func (s *ListTagsForResourceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListTagsForResourceOutput added in v0.24.0

type ListTagsForResourceOutput struct {

	// The tags that are assigned to the resource.
	Tags []Tag `type:"list"`
	// contains filtered or unexported fields
}

func (ListTagsForResourceOutput) String added in v0.24.0

func (s ListTagsForResourceOutput) String() string

String returns the string representation

type ListTagsForResourceRequest added in v0.24.0

type ListTagsForResourceRequest struct {
	*aws.Request
	Input *ListTagsForResourceInput
	Copy  func(*ListTagsForResourceInput) ListTagsForResourceRequest
}

ListTagsForResourceRequest is the request type for the ListTagsForResource API operation.

func (ListTagsForResourceRequest) Send added in v0.24.0

Send marshals and sends the ListTagsForResource API request.

type ListTagsForResourceResponse added in v0.24.0

type ListTagsForResourceResponse struct {
	*ListTagsForResourceOutput
	// contains filtered or unexported fields
}

ListTagsForResourceResponse is the response type for the ListTagsForResource API operation.

func (*ListTagsForResourceResponse) SDKResponseMetdata added in v0.24.0

func (r *ListTagsForResourceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the ListTagsForResource request.

type Namespace

type Namespace struct {

	// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace
	// when you create it.
	Arn *string `type:"string"`

	// The date that the namespace was created, in Unix date/time format and Coordinated
	// Universal Time (UTC). The value of CreateDate is accurate to milliseconds.
	// For example, the value 1516925490.087 represents Friday, January 26, 2018
	// 12:11:30.087 AM.
	CreateDate *time.Time `type:"timestamp"`

	// A unique string that identifies the request and that allows failed requests
	// to be retried without the risk of executing an operation twice.
	CreatorRequestId *string `type:"string"`

	// The description that you specify for the namespace when you create it.
	Description *string `type:"string"`

	// The ID of a namespace.
	Id *string `type:"string"`

	// The name of the namespace, such as example.com.
	Name *string `type:"string"`

	// A complex type that contains information that's specific to the type of the
	// namespace.
	Properties *NamespaceProperties `type:"structure"`

	// The number of services that are associated with the namespace.
	ServiceCount *int64 `type:"integer"`

	// The type of the namespace. The methods for discovering instances depends
	// on the value that you specify:
	//
	//    * HTTP: Instances can be discovered only programmatically, using the AWS
	//    Cloud Map DiscoverInstances API.
	//
	//    * DNS_PUBLIC: Instances can be discovered using public DNS queries and
	//    using the DiscoverInstances API.
	//
	//    * DNS_PRIVATE: Instances can be discovered using DNS queries in VPCs and
	//    using the DiscoverInstances API.
	Type NamespaceType `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about a specified namespace.

func (Namespace) String

func (s Namespace) String() string

String returns the string representation

type NamespaceFilter

type NamespaceFilter struct {

	// The operator that you want to use to determine whether ListNamespaces returns
	// a namespace. Valid values for condition include:
	//
	//    * EQ: When you specify EQ for the condition, you can choose to list only
	//    public namespaces or private namespaces, but not both. EQ is the default
	//    condition and can be omitted.
	//
	//    * IN: When you specify IN for the condition, you can choose to list public
	//    namespaces, private namespaces, or both.
	//
	//    * BETWEEN: Not applicable
	Condition FilterCondition `type:"string" enum:"true"`

	// Specify TYPE.
	//
	// Name is a required field
	Name NamespaceFilterName `type:"string" required:"true" enum:"true"`

	// If you specify EQ for Condition, specify either DNS_PUBLIC or DNS_PRIVATE.
	//
	// If you specify IN for Condition, you can specify DNS_PUBLIC, DNS_PRIVATE,
	// or both.
	//
	// Values is a required field
	Values []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

A complex type that identifies the namespaces that you want to list. You can choose to list public or private namespaces.

func (NamespaceFilter) String

func (s NamespaceFilter) String() string

String returns the string representation

func (*NamespaceFilter) Validate

func (s *NamespaceFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type NamespaceFilterName

type NamespaceFilterName string
const (
	NamespaceFilterNameType NamespaceFilterName = "TYPE"
)

Enum values for NamespaceFilterName

func (NamespaceFilterName) MarshalValue added in v0.3.0

func (enum NamespaceFilterName) MarshalValue() (string, error)

func (NamespaceFilterName) MarshalValueBuf added in v0.3.0

func (enum NamespaceFilterName) MarshalValueBuf(b []byte) ([]byte, error)

type NamespaceProperties

type NamespaceProperties struct {

	// A complex type that contains the ID for the Route 53 hosted zone that AWS
	// Cloud Map creates when you create a namespace.
	DnsProperties *DnsProperties `type:"structure"`

	// A complex type that contains the name of an HTTP namespace.
	HttpProperties *HttpProperties `type:"structure"`
	// contains filtered or unexported fields
}

A complex type that contains information that is specific to the namespace type.

func (NamespaceProperties) String

func (s NamespaceProperties) String() string

String returns the string representation

type NamespaceSummary

type NamespaceSummary struct {

	// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace
	// when you create it.
	Arn *string `type:"string"`

	// The date and time that the namespace was created.
	CreateDate *time.Time `type:"timestamp"`

	// A description for the namespace.
	Description *string `type:"string"`

	// The ID of the namespace.
	Id *string `type:"string"`

	// The name of the namespace. When you create a namespace, AWS Cloud Map automatically
	// creates a Route 53 hosted zone that has the same name as the namespace.
	Name *string `type:"string"`

	// A complex type that contains information that is specific to the namespace
	// type.
	Properties *NamespaceProperties `type:"structure"`

	// The number of services that were created using the namespace.
	ServiceCount *int64 `type:"integer"`

	// The type of the namespace, either public or private.
	Type NamespaceType `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about a namespace.

func (NamespaceSummary) String

func (s NamespaceSummary) String() string

String returns the string representation

type NamespaceType

type NamespaceType string
const (
	NamespaceTypeDnsPublic  NamespaceType = "DNS_PUBLIC"
	NamespaceTypeDnsPrivate NamespaceType = "DNS_PRIVATE"
	NamespaceTypeHttp       NamespaceType = "HTTP"
)

Enum values for NamespaceType

func (NamespaceType) MarshalValue added in v0.3.0

func (enum NamespaceType) MarshalValue() (string, error)

func (NamespaceType) MarshalValueBuf added in v0.3.0

func (enum NamespaceType) MarshalValueBuf(b []byte) ([]byte, error)

type Operation

type Operation struct {

	// The date and time that the request was submitted, in Unix date/time format
	// and Coordinated Universal Time (UTC). The value of CreateDate is accurate
	// to milliseconds. For example, the value 1516925490.087 represents Friday,
	// January 26, 2018 12:11:30.087 AM.
	CreateDate *time.Time `type:"timestamp"`

	// The code associated with ErrorMessage. Values for ErrorCode include the following:
	//
	//    * ACCESS_DENIED
	//
	//    * CANNOT_CREATE_HOSTED_ZONE
	//
	//    * EXPIRED_TOKEN
	//
	//    * HOSTED_ZONE_NOT_FOUND
	//
	//    * INTERNAL_FAILURE
	//
	//    * INVALID_CHANGE_BATCH
	//
	//    * THROTTLED_REQUEST
	ErrorCode *string `type:"string"`

	// If the value of Status is FAIL, the reason that the operation failed.
	ErrorMessage *string `type:"string"`

	// The ID of the operation that you want to get information about.
	Id *string `type:"string"`

	// The status of the operation. Values include the following:
	//
	//    * SUBMITTED: This is the initial state immediately after you submit a
	//    request.
	//
	//    * PENDING: AWS Cloud Map is performing the operation.
	//
	//    * SUCCESS: The operation succeeded.
	//
	//    * FAIL: The operation failed. For the failure reason, see ErrorMessage.
	Status OperationStatus `type:"string" enum:"true"`

	// The name of the target entity that is associated with the operation:
	//
	//    * NAMESPACE: The namespace ID is returned in the ResourceId property.
	//
	//    * SERVICE: The service ID is returned in the ResourceId property.
	//
	//    * INSTANCE: The instance ID is returned in the ResourceId property.
	Targets map[string]string `type:"map"`

	// The name of the operation that is associated with the specified ID.
	Type OperationType `type:"string" enum:"true"`

	// The date and time that the value of Status changed to the current value,
	// in Unix date/time format and Coordinated Universal Time (UTC). The value
	// of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087
	// represents Friday, January 26, 2018 12:11:30.087 AM.
	UpdateDate *time.Time `type:"timestamp"`
	// contains filtered or unexported fields
}

A complex type that contains information about a specified operation.

func (Operation) String

func (s Operation) String() string

String returns the string representation

type OperationFilter

type OperationFilter struct {

	// The operator that you want to use to determine whether an operation matches
	// the specified value. Valid values for condition include:
	//
	//    * EQ: When you specify EQ for the condition, you can specify only one
	//    value. EQ is supported for NAMESPACE_ID, SERVICE_ID, STATUS, and TYPE.
	//    EQ is the default condition and can be omitted.
	//
	//    * IN: When you specify IN for the condition, you can specify a list of
	//    one or more values. IN is supported for STATUS and TYPE. An operation
	//    must match one of the specified values to be returned in the response.
	//
	//    * BETWEEN: Specify a start date and an end date in Unix date/time format
	//    and Coordinated Universal Time (UTC). The start date must be the first
	//    value. BETWEEN is supported for UPDATE_DATE.
	Condition FilterCondition `type:"string" enum:"true"`

	// Specify the operations that you want to get:
	//
	//    * NAMESPACE_ID: Gets operations related to specified namespaces.
	//
	//    * SERVICE_ID: Gets operations related to specified services.
	//
	//    * STATUS: Gets operations based on the status of the operations: SUBMITTED,
	//    PENDING, SUCCEED, or FAIL.
	//
	//    * TYPE: Gets specified types of operation.
	//
	//    * UPDATE_DATE: Gets operations that changed status during a specified
	//    date/time range.
	//
	// Name is a required field
	Name OperationFilterName `type:"string" required:"true" enum:"true"`

	// Specify values that are applicable to the value that you specify for Name:
	//
	//    * NAMESPACE_ID: Specify one namespace ID.
	//
	//    * SERVICE_ID: Specify one service ID.
	//
	//    * STATUS: Specify one or more statuses: SUBMITTED, PENDING, SUCCEED, or
	//    FAIL.
	//
	//    * TYPE: Specify one or more of the following types: CREATE_NAMESPACE,
	//    DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, or DEREGISTER_INSTANCE.
	//
	//    * UPDATE_DATE: Specify a start date and an end date in Unix date/time
	//    format and Coordinated Universal Time (UTC). The start date must be the
	//    first value.
	//
	// Values is a required field
	Values []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

A complex type that lets you select the operations that you want to list.

func (OperationFilter) String

func (s OperationFilter) String() string

String returns the string representation

func (*OperationFilter) Validate

func (s *OperationFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type OperationFilterName

type OperationFilterName string
const (
	OperationFilterNameNamespaceId OperationFilterName = "NAMESPACE_ID"
	OperationFilterNameServiceId   OperationFilterName = "SERVICE_ID"
	OperationFilterNameStatus      OperationFilterName = "STATUS"
	OperationFilterNameType        OperationFilterName = "TYPE"
	OperationFilterNameUpdateDate  OperationFilterName = "UPDATE_DATE"
)

Enum values for OperationFilterName

func (OperationFilterName) MarshalValue added in v0.3.0

func (enum OperationFilterName) MarshalValue() (string, error)

func (OperationFilterName) MarshalValueBuf added in v0.3.0

func (enum OperationFilterName) MarshalValueBuf(b []byte) ([]byte, error)

type OperationStatus

type OperationStatus string
const (
	OperationStatusSubmitted OperationStatus = "SUBMITTED"
	OperationStatusPending   OperationStatus = "PENDING"
	OperationStatusSuccess   OperationStatus = "SUCCESS"
	OperationStatusFail      OperationStatus = "FAIL"
)

Enum values for OperationStatus

func (OperationStatus) MarshalValue added in v0.3.0

func (enum OperationStatus) MarshalValue() (string, error)

func (OperationStatus) MarshalValueBuf added in v0.3.0

func (enum OperationStatus) MarshalValueBuf(b []byte) ([]byte, error)

type OperationSummary

type OperationSummary struct {

	// The ID for an operation.
	Id *string `type:"string"`

	// The status of the operation. Values include the following:
	//
	//    * SUBMITTED: This is the initial state immediately after you submit a
	//    request.
	//
	//    * PENDING: AWS Cloud Map is performing the operation.
	//
	//    * SUCCESS: The operation succeeded.
	//
	//    * FAIL: The operation failed. For the failure reason, see ErrorMessage.
	Status OperationStatus `type:"string" enum:"true"`
	// contains filtered or unexported fields
}

A complex type that contains information about an operation that matches the criteria that you specified in a ListOperations (https://docs.aws.amazon.com/cloud-map/latest/api/API_ListOperations.html) request.

func (OperationSummary) String

func (s OperationSummary) String() string

String returns the string representation

type OperationTargetType

type OperationTargetType string
const (
	OperationTargetTypeNamespace OperationTargetType = "NAMESPACE"
	OperationTargetTypeService   OperationTargetType = "SERVICE"
	OperationTargetTypeInstance  OperationTargetType = "INSTANCE"
)

Enum values for OperationTargetType

func (OperationTargetType) MarshalValue added in v0.3.0

func (enum OperationTargetType) MarshalValue() (string, error)

func (OperationTargetType) MarshalValueBuf added in v0.3.0

func (enum OperationTargetType) MarshalValueBuf(b []byte) ([]byte, error)

type OperationType

type OperationType string
const (
	OperationTypeCreateNamespace    OperationType = "CREATE_NAMESPACE"
	OperationTypeDeleteNamespace    OperationType = "DELETE_NAMESPACE"
	OperationTypeUpdateService      OperationType = "UPDATE_SERVICE"
	OperationTypeRegisterInstance   OperationType = "REGISTER_INSTANCE"
	OperationTypeDeregisterInstance OperationType = "DEREGISTER_INSTANCE"
)

Enum values for OperationType

func (OperationType) MarshalValue added in v0.3.0

func (enum OperationType) MarshalValue() (string, error)

func (OperationType) MarshalValueBuf added in v0.3.0

func (enum OperationType) MarshalValueBuf(b []byte) ([]byte, error)

type RecordType

type RecordType string
const (
	RecordTypeSrv   RecordType = "SRV"
	RecordTypeA     RecordType = "A"
	RecordTypeAaaa  RecordType = "AAAA"
	RecordTypeCname RecordType = "CNAME"
)

Enum values for RecordType

func (RecordType) MarshalValue added in v0.3.0

func (enum RecordType) MarshalValue() (string, error)

func (RecordType) MarshalValueBuf added in v0.3.0

func (enum RecordType) MarshalValueBuf(b []byte) ([]byte, error)

type RegisterInstanceInput

type RegisterInstanceInput struct {

	// A string map that contains the following information for the service that
	// you specify in ServiceId:
	//
	//    * The attributes that apply to the records that are defined in the service.
	//
	//    * For each attribute, the applicable value.
	//
	// Supported attribute keys include the following:
	//
	// AWS_ALIAS_DNS_NAME
	//
	// If you want AWS Cloud Map to create an Amazon Route 53 alias record that
	// routes traffic to an Elastic Load Balancing load balancer, specify the DNS
	// name that is associated with the load balancer. For information about how
	// to get the DNS name, see "DNSName" in the topic AliasTarget (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html)
	// in the Route 53 API Reference.
	//
	// Note the following:
	//
	//    * The configuration for the service that is specified by ServiceId must
	//    include settings for an A record, an AAAA record, or both.
	//
	//    * In the service that is specified by ServiceId, the value of RoutingPolicy
	//    must be WEIGHTED.
	//
	//    * If the service that is specified by ServiceId includes HealthCheckConfig
	//    settings, AWS Cloud Map will create the Route 53 health check, but it
	//    won't associate the health check with the alias record.
	//
	//    * Auto naming currently doesn't support creating alias records that route
	//    traffic to AWS resources other than ELB load balancers.
	//
	//    * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values
	//    for any of the AWS_INSTANCE attributes.
	//
	// AWS_INIT_HEALTH_STATUS
	//
	// If the service configuration includes HealthCheckCustomConfig, you can optionally
	// use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health
	// check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS,
	// the initial status is HEALTHY.
	//
	// AWS_INSTANCE_CNAME
	//
	// If the service configuration includes a CNAME record, the domain name that
	// you want Route 53 to return in response to DNS queries, for example, example.com.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an CNAME record.
	//
	// AWS_INSTANCE_IPV4
	//
	// If the service configuration includes an A record, the IPv4 address that
	// you want Route 53 to return in response to DNS queries, for example, 192.0.2.44.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an A record. If the service includes settings for an SRV record, you
	// must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
	//
	// AWS_INSTANCE_IPV6
	//
	// If the service configuration includes an AAAA record, the IPv6 address that
	// you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345.
	//
	// This value is required if the service specified by ServiceId includes settings
	// for an AAAA record. If the service includes settings for an SRV record, you
	// must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both.
	//
	// AWS_INSTANCE_PORT
	//
	// If the service includes an SRV record, the value that you want Route 53 to
	// return for the port.
	//
	// If the service includes HealthCheckConfig, the port on the endpoint that
	// you want Route 53 to send requests to.
	//
	// This value is required if you specified settings for an SRV record or a Route
	// 53 health check when you created the service.
	//
	// Custom attributes
	//
	// You can add up to 30 custom attributes. For each key-value pair, the maximum
	// length of the attribute name is 255 characters, and the maximum length of
	// the attribute value is 1,024 characters. Total size of all provided attributes
	// (sum of all keys and values) must not exceed 5,000 characters.
	//
	// Attributes is a required field
	Attributes map[string]string `type:"map" required:"true"`

	// A unique string that identifies the request and that allows failed RegisterInstance
	// requests to be retried without the risk of executing the operation twice.
	// You must use a unique CreatorRequestId string every time you submit a RegisterInstance
	// request if you're registering additional instances for the same namespace
	// and service. CreatorRequestId can be any unique string, for example, a date/time
	// stamp.
	CreatorRequestId *string `type:"string" idempotencyToken:"true"`

	// An identifier that you want to associate with the instance. Note the following:
	//
	//    * If the service that is specified by ServiceId includes settings for
	//    an SRV record, the value of InstanceId is automatically included as part
	//    of the value for the SRV record. For more information, see DnsRecord >
	//    Type (https://docs.aws.amazon.com/cloud-map/latest/api/API_DnsRecord.html#cloudmap-Type-DnsRecord-Type).
	//
	//    * You can use this value to update an existing instance.
	//
	//    * To register a new instance, you must specify a value that is unique
	//    among instances that you register by using the same service.
	//
	//    * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates
	//    the existing DNS records, if any. If there's also an existing health check,
	//    AWS Cloud Map deletes the old health check and creates a new one. The
	//    health check isn't deleted immediately, so it will still appear for a
	//    while if you submit a ListHealthChecks request, for example.
	//
	// InstanceId is a required field
	InstanceId *string `type:"string" required:"true"`

	// The ID of the service that you want to use for settings for the instance.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

func (RegisterInstanceInput) String

func (s RegisterInstanceInput) String() string

String returns the string representation

func (*RegisterInstanceInput) Validate

func (s *RegisterInstanceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type RegisterInstanceOutput

type RegisterInstanceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (RegisterInstanceOutput) String

func (s RegisterInstanceOutput) String() string

String returns the string representation

type RegisterInstanceRequest

type RegisterInstanceRequest struct {
	*aws.Request
	Input *RegisterInstanceInput
	Copy  func(*RegisterInstanceInput) RegisterInstanceRequest
}

RegisterInstanceRequest is the request type for the RegisterInstance API operation.

func (RegisterInstanceRequest) Send

Send marshals and sends the RegisterInstance API request.

type RegisterInstanceResponse added in v0.9.0

type RegisterInstanceResponse struct {
	*RegisterInstanceOutput
	// contains filtered or unexported fields
}

RegisterInstanceResponse is the response type for the RegisterInstance API operation.

func (*RegisterInstanceResponse) SDKResponseMetdata added in v0.9.0

func (r *RegisterInstanceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the RegisterInstance request.

type RoutingPolicy added in v0.3.0

type RoutingPolicy string
const (
	RoutingPolicyMultivalue RoutingPolicy = "MULTIVALUE"
	RoutingPolicyWeighted   RoutingPolicy = "WEIGHTED"
)

Enum values for RoutingPolicy

func (RoutingPolicy) MarshalValue added in v0.3.0

func (enum RoutingPolicy) MarshalValue() (string, error)

func (RoutingPolicy) MarshalValueBuf added in v0.3.0

func (enum RoutingPolicy) MarshalValueBuf(b []byte) ([]byte, error)

type Service

type Service struct {

	// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service
	// when you create it.
	Arn *string `type:"string"`

	// The date and time that the service was created, in Unix format and Coordinated
	// Universal Time (UTC). The value of CreateDate is accurate to milliseconds.
	// For example, the value 1516925490.087 represents Friday, January 26, 2018
	// 12:11:30.087 AM.
	CreateDate *time.Time `type:"timestamp"`

	// A unique string that identifies the request and that allows failed requests
	// to be retried without the risk of executing the operation twice. CreatorRequestId
	// can be any unique string, for example, a date/time stamp.
	CreatorRequestId *string `type:"string"`

	// The description of the service.
	Description *string `type:"string"`

	// A complex type that contains information about the Route 53 DNS records that
	// you want AWS Cloud Map to create when you register an instance.
	DnsConfig *DnsConfig `type:"structure"`

	// Public DNS and HTTP namespaces only. A complex type that contains settings
	// for an optional health check. If you specify settings for a health check,
	// AWS Cloud Map associates the health check with the records that you specify
	// in DnsConfig.
	//
	// For information about the charges for health checks, see Amazon Route 53
	// Pricing (http://aws.amazon.com/route53/pricing/).
	HealthCheckConfig *HealthCheckConfig `type:"structure"`

	// A complex type that contains information about an optional custom health
	// check.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`

	// The ID that AWS Cloud Map assigned to the service when you created it.
	Id *string `type:"string"`

	// The number of instances that are currently associated with the service. Instances
	// that were previously associated with the service but that have been deleted
	// are not included in the count. The count might not reflect pending registrations
	// and deregistrations.
	InstanceCount *int64 `type:"integer"`

	// The name of the service.
	Name *string `type:"string"`

	// The ID of the namespace that was used to create the service.
	NamespaceId *string `type:"string"`
	// contains filtered or unexported fields
}

A complex type that contains information about the specified service.

func (Service) String

func (s Service) String() string

String returns the string representation

type ServiceChange

type ServiceChange struct {

	// A description for the service.
	Description *string `type:"string"`

	// A complex type that contains information about the Route 53 DNS records that
	// you want AWS Cloud Map to create when you register an instance.
	DnsConfig *DnsConfigChange `type:"structure"`

	// Public DNS and HTTP namespaces only. A complex type that contains settings
	// for an optional health check. If you specify settings for a health check,
	// AWS Cloud Map associates the health check with the records that you specify
	// in DnsConfig.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	//
	// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
	// For information about pricing for health checks, see Amazon Route 53 Pricing
	// (http://aws.amazon.com/route53/pricing/).
	//
	// Note the following about configuring health checks.
	//
	// A and AAAA records
	//
	// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
	// Map creates a health check that uses the IPv4 address to check the health
	// of the resource. If the endpoint that is specified by the IPv4 address is
	// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
	//
	// CNAME records
	//
	// You can't specify settings for HealthCheckConfig when the DNSConfig includes
	// CNAME for the value of Type. If you do, the CreateService request will fail
	// with an InvalidInput error.
	//
	// Request interval
	//
	// A Route 53 health checker in each health-checking region sends a health check
	// request to an endpoint every 30 seconds. On average, your endpoint receives
	// a health check request about every two seconds. However, health checkers
	// don't coordinate with one another, so you'll sometimes see several requests
	// per second followed by a few seconds with no health checks at all.
	//
	// Health checking regions
	//
	// Health checkers perform checks from all Route 53 health-checking regions.
	// For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
	//
	// Alias records
	//
	// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
	// AWS Cloud Map creates a Route 53 alias record. Note the following:
	//
	//    * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
	//    When EvaluateTargetHealth is true, the alias record inherits the health
	//    of the referenced AWS resource. such as an ELB load balancer. For more
	//    information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).
	//
	//    * If you include HealthCheckConfig and then use the service to register
	//    an instance that creates an alias record, Route 53 doesn't create the
	//    health check.
	//
	// Charges for health checks
	//
	// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
	// For information about pricing for health checks, see Amazon Route 53 Pricing
	// (http://aws.amazon.com/route53/pricing/).
	HealthCheckConfig *HealthCheckConfig `type:"structure"`
	// contains filtered or unexported fields
}

A complex type that contains changes to an existing service.

func (ServiceChange) String

func (s ServiceChange) String() string

String returns the string representation

func (*ServiceChange) Validate

func (s *ServiceChange) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ServiceFilter

type ServiceFilter struct {

	// The operator that you want to use to determine whether a service is returned
	// by ListServices. Valid values for Condition include the following:
	//
	//    * EQ: When you specify EQ, specify one namespace ID for Values. EQ is
	//    the default condition and can be omitted.
	//
	//    * IN: When you specify IN, specify a list of the IDs for the namespaces
	//    that you want ListServices to return a list of services for.
	//
	//    * BETWEEN: Not applicable.
	Condition FilterCondition `type:"string" enum:"true"`

	// Specify NAMESPACE_ID.
	//
	// Name is a required field
	Name ServiceFilterName `type:"string" required:"true" enum:"true"`

	// The values that are applicable to the value that you specify for Condition
	// to filter the list of services.
	//
	// Values is a required field
	Values []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

A complex type that lets you specify the namespaces that you want to list services for.

func (ServiceFilter) String

func (s ServiceFilter) String() string

String returns the string representation

func (*ServiceFilter) Validate

func (s *ServiceFilter) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ServiceFilterName

type ServiceFilterName string
const (
	ServiceFilterNameNamespaceId ServiceFilterName = "NAMESPACE_ID"
)

Enum values for ServiceFilterName

func (ServiceFilterName) MarshalValue added in v0.3.0

func (enum ServiceFilterName) MarshalValue() (string, error)

func (ServiceFilterName) MarshalValueBuf added in v0.3.0

func (enum ServiceFilterName) MarshalValueBuf(b []byte) ([]byte, error)

type ServiceSummary

type ServiceSummary struct {

	// The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service
	// when you create it.
	Arn *string `type:"string"`

	// The date and time that the service was created.
	CreateDate *time.Time `type:"timestamp"`

	// The description that you specify when you create the service.
	Description *string `type:"string"`

	// A complex type that contains information about the Amazon Route 53 DNS records
	// that you want AWS Cloud Map to create when you register an instance.
	DnsConfig *DnsConfig `type:"structure"`

	// Public DNS and HTTP namespaces only. A complex type that contains settings
	// for an optional health check. If you specify settings for a health check,
	// AWS Cloud Map associates the health check with the records that you specify
	// in DnsConfig.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	//
	// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
	// For information about pricing for health checks, see Amazon Route 53 Pricing
	// (http://aws.amazon.com/route53/pricing/).
	//
	// Note the following about configuring health checks.
	//
	// A and AAAA records
	//
	// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud
	// Map creates a health check that uses the IPv4 address to check the health
	// of the resource. If the endpoint that is specified by the IPv4 address is
	// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy.
	//
	// CNAME records
	//
	// You can't specify settings for HealthCheckConfig when the DNSConfig includes
	// CNAME for the value of Type. If you do, the CreateService request will fail
	// with an InvalidInput error.
	//
	// Request interval
	//
	// A Route 53 health checker in each health-checking region sends a health check
	// request to an endpoint every 30 seconds. On average, your endpoint receives
	// a health check request about every two seconds. However, health checkers
	// don't coordinate with one another, so you'll sometimes see several requests
	// per second followed by a few seconds with no health checks at all.
	//
	// Health checking regions
	//
	// Health checkers perform checks from all Route 53 health-checking regions.
	// For a list of the current regions, see Regions (https://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions).
	//
	// Alias records
	//
	// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute,
	// AWS Cloud Map creates a Route 53 alias record. Note the following:
	//
	//    * Route 53 automatically sets EvaluateTargetHealth to true for alias records.
	//    When EvaluateTargetHealth is true, the alias record inherits the health
	//    of the referenced AWS resource. such as an ELB load balancer. For more
	//    information, see EvaluateTargetHealth (https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth).
	//
	//    * If you include HealthCheckConfig and then use the service to register
	//    an instance that creates an alias record, Route 53 doesn't create the
	//    health check.
	//
	// Charges for health checks
	//
	// Health checks are basic Route 53 health checks that monitor an AWS endpoint.
	// For information about pricing for health checks, see Amazon Route 53 Pricing
	// (http://aws.amazon.com/route53/pricing/).
	HealthCheckConfig *HealthCheckConfig `type:"structure"`

	// A complex type that contains information about an optional custom health
	// check. A custom health check, which requires that you use a third-party health
	// checker to evaluate the health of your resources, is useful in the following
	// circumstances:
	//
	//    * You can't use a health check that is defined by HealthCheckConfig because
	//    the resource isn't available over the internet. For example, you can use
	//    a custom health check when the instance is in an Amazon VPC. (To check
	//    the health of resources in a VPC, the health checker must also be in the
	//    VPC.)
	//
	//    * You want to use a third-party health checker regardless of where your
	//    resources are.
	//
	// If you specify a health check configuration, you can specify either HealthCheckCustomConfig
	// or HealthCheckConfig but not both.
	//
	// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus
	// request. AWS Cloud Map doesn't monitor the status of the resource, it just
	// keeps a record of the status specified in the most recent UpdateInstanceCustomHealthStatus
	// request.
	//
	// Here's how custom health checks work:
	//
	// You create a service and specify a value for FailureThreshold.
	//
	// The failure threshold indicates the number of 30-second intervals you want
	// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus
	// (https://docs.aws.amazon.com/cloud-map/latest/api/API_UpdateInstanceCustomHealthStatus.html)
	// request and the time that AWS Cloud Map stops routing internet traffic to
	// the corresponding resource.
	//
	// You register an instance.
	//
	// You configure a third-party health checker to monitor the resource that is
	// associated with the new instance.
	//
	// AWS Cloud Map doesn't check the health of the resource directly.
	//
	// The third-party health-checker determines that the resource is unhealthy
	// and notifies your application.
	//
	// Your application submits an UpdateInstanceCustomHealthStatus request.
	//
	// AWS Cloud Map waits for (FailureThreshold x 30) seconds.
	//
	// If another UpdateInstanceCustomHealthStatus request doesn't arrive during
	// that time to change the status back to healthy, AWS Cloud Map stops routing
	// traffic to the resource.
	HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"`

	// The ID that AWS Cloud Map assigned to the service when you created it.
	Id *string `type:"string"`

	// The number of instances that are currently associated with the service. Instances
	// that were previously associated with the service but that have been deleted
	// are not included in the count. The count might not reflect pending registrations
	// and deregistrations.
	InstanceCount *int64 `type:"integer"`

	// The name of the service.
	Name *string `type:"string"`
	// contains filtered or unexported fields
}

A complex type that contains information about a specified service.

func (ServiceSummary) String

func (s ServiceSummary) String() string

String returns the string representation

type Tag added in v0.24.0

type Tag struct {

	// The key identifier, or name, of the tag.
	//
	// Key is a required field
	Key *string `min:"1" type:"string" required:"true"`

	// The string value that's associated with the key of the tag. You can set the
	// value of a tag to an empty string, but you can't set the value of a tag to
	// null.
	//
	// Value is a required field
	Value *string `type:"string" required:"true"`
	// contains filtered or unexported fields
}

A custom key-value pair associated with a resource.

func (Tag) String added in v0.24.0

func (s Tag) String() string

String returns the string representation

func (*Tag) Validate added in v0.24.0

func (s *Tag) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TagResourceInput added in v0.24.0

type TagResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource that you want to retrieve
	// tags for.
	//
	// ResourceARN is a required field
	ResourceARN *string `min:"1" type:"string" required:"true"`

	// The tags to add to the specified resource. Specifying the tag key is required.
	// You can set the value of a tag to an empty string, but you can't set the
	// value of a tag to null.
	//
	// Tags is a required field
	Tags []Tag `type:"list" required:"true"`
	// contains filtered or unexported fields
}

func (TagResourceInput) String added in v0.24.0

func (s TagResourceInput) String() string

String returns the string representation

func (*TagResourceInput) Validate added in v0.24.0

func (s *TagResourceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type TagResourceOutput added in v0.24.0

type TagResourceOutput struct {
	// contains filtered or unexported fields
}

func (TagResourceOutput) String added in v0.24.0

func (s TagResourceOutput) String() string

String returns the string representation

type TagResourceRequest added in v0.24.0

type TagResourceRequest struct {
	*aws.Request
	Input *TagResourceInput
	Copy  func(*TagResourceInput) TagResourceRequest
}

TagResourceRequest is the request type for the TagResource API operation.

func (TagResourceRequest) Send added in v0.24.0

Send marshals and sends the TagResource API request.

type TagResourceResponse added in v0.24.0

type TagResourceResponse struct {
	*TagResourceOutput
	// contains filtered or unexported fields
}

TagResourceResponse is the response type for the TagResource API operation.

func (*TagResourceResponse) SDKResponseMetdata added in v0.24.0

func (r *TagResourceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the TagResource request.

type UntagResourceInput added in v0.24.0

type UntagResourceInput struct {

	// The Amazon Resource Name (ARN) of the resource that you want to retrieve
	// tags for.
	//
	// ResourceARN is a required field
	ResourceARN *string `min:"1" type:"string" required:"true"`

	// The tag keys to remove from the specified resource.
	//
	// TagKeys is a required field
	TagKeys []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

func (UntagResourceInput) String added in v0.24.0

func (s UntagResourceInput) String() string

String returns the string representation

func (*UntagResourceInput) Validate added in v0.24.0

func (s *UntagResourceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UntagResourceOutput added in v0.24.0

type UntagResourceOutput struct {
	// contains filtered or unexported fields
}

func (UntagResourceOutput) String added in v0.24.0

func (s UntagResourceOutput) String() string

String returns the string representation

type UntagResourceRequest added in v0.24.0

type UntagResourceRequest struct {
	*aws.Request
	Input *UntagResourceInput
	Copy  func(*UntagResourceInput) UntagResourceRequest
}

UntagResourceRequest is the request type for the UntagResource API operation.

func (UntagResourceRequest) Send added in v0.24.0

Send marshals and sends the UntagResource API request.

type UntagResourceResponse added in v0.24.0

type UntagResourceResponse struct {
	*UntagResourceOutput
	// contains filtered or unexported fields
}

UntagResourceResponse is the response type for the UntagResource API operation.

func (*UntagResourceResponse) SDKResponseMetdata added in v0.24.0

func (r *UntagResourceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UntagResource request.

type UpdateInstanceCustomHealthStatusInput added in v0.4.0

type UpdateInstanceCustomHealthStatusInput struct {

	// The ID of the instance that you want to change the health status for.
	//
	// InstanceId is a required field
	InstanceId *string `type:"string" required:"true"`

	// The ID of the service that includes the configuration for the custom health
	// check that you want to change the status for.
	//
	// ServiceId is a required field
	ServiceId *string `type:"string" required:"true"`

	// The new status of the instance, HEALTHY or UNHEALTHY.
	//
	// Status is a required field
	Status CustomHealthStatus `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

func (UpdateInstanceCustomHealthStatusInput) String added in v0.4.0

String returns the string representation

func (*UpdateInstanceCustomHealthStatusInput) Validate added in v0.4.0

Validate inspects the fields of the type to determine if they are valid.

type UpdateInstanceCustomHealthStatusOutput added in v0.4.0

type UpdateInstanceCustomHealthStatusOutput struct {
	// contains filtered or unexported fields
}

func (UpdateInstanceCustomHealthStatusOutput) String added in v0.4.0

String returns the string representation

type UpdateInstanceCustomHealthStatusRequest added in v0.4.0

type UpdateInstanceCustomHealthStatusRequest struct {
	*aws.Request
	Input *UpdateInstanceCustomHealthStatusInput
	Copy  func(*UpdateInstanceCustomHealthStatusInput) UpdateInstanceCustomHealthStatusRequest
}

UpdateInstanceCustomHealthStatusRequest is the request type for the UpdateInstanceCustomHealthStatus API operation.

func (UpdateInstanceCustomHealthStatusRequest) Send added in v0.4.0

Send marshals and sends the UpdateInstanceCustomHealthStatus API request.

type UpdateInstanceCustomHealthStatusResponse added in v0.9.0

type UpdateInstanceCustomHealthStatusResponse struct {
	*UpdateInstanceCustomHealthStatusOutput
	// contains filtered or unexported fields
}

UpdateInstanceCustomHealthStatusResponse is the response type for the UpdateInstanceCustomHealthStatus API operation.

func (*UpdateInstanceCustomHealthStatusResponse) SDKResponseMetdata added in v0.9.0

func (r *UpdateInstanceCustomHealthStatusResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateInstanceCustomHealthStatus request.

type UpdateServiceInput

type UpdateServiceInput struct {

	// The ID of the service that you want to update.
	//
	// Id is a required field
	Id *string `type:"string" required:"true"`

	// A complex type that contains the new settings for the service.
	//
	// Service is a required field
	Service *ServiceChange `type:"structure" required:"true"`
	// contains filtered or unexported fields
}

func (UpdateServiceInput) String

func (s UpdateServiceInput) String() string

String returns the string representation

func (*UpdateServiceInput) Validate

func (s *UpdateServiceInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type UpdateServiceOutput

type UpdateServiceOutput struct {

	// A value that you can use to determine whether the request completed successfully.
	// To get the status of the operation, see GetOperation (https://docs.aws.amazon.com/cloud-map/latest/api/API_GetOperation.html).
	OperationId *string `type:"string"`
	// contains filtered or unexported fields
}

func (UpdateServiceOutput) String

func (s UpdateServiceOutput) String() string

String returns the string representation

type UpdateServiceRequest

type UpdateServiceRequest struct {
	*aws.Request
	Input *UpdateServiceInput
	Copy  func(*UpdateServiceInput) UpdateServiceRequest
}

UpdateServiceRequest is the request type for the UpdateService API operation.

func (UpdateServiceRequest) Send

Send marshals and sends the UpdateService API request.

type UpdateServiceResponse added in v0.9.0

type UpdateServiceResponse struct {
	*UpdateServiceOutput
	// contains filtered or unexported fields
}

UpdateServiceResponse is the response type for the UpdateService API operation.

func (*UpdateServiceResponse) SDKResponseMetdata added in v0.9.0

func (r *UpdateServiceResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the UpdateService request.

Directories

Path Synopsis
Package servicediscoveryiface provides an interface to enable mocking the AWS Cloud Map service client for testing your code.
Package servicediscoveryiface provides an interface to enable mocking the AWS Cloud Map service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL