1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package servicediscovery 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" 14) 15 16const opCreateHttpNamespace = "CreateHttpNamespace" 17 18// CreateHttpNamespaceRequest generates a "aws/request.Request" representing the 19// client's request for the CreateHttpNamespace operation. The "output" return 20// value will be populated with the request's response once the request completes 21// successfully. 22// 23// Use "Send" method on the returned Request to send the API call to the service. 24// the "output" return value is not valid until after Send returns without error. 25// 26// See CreateHttpNamespace for more information on using the CreateHttpNamespace 27// API call, and error handling. 28// 29// This method is useful when you want to inject custom logic or configuration 30// into the SDK's request lifecycle. Such as custom headers, or retry logic. 31// 32// 33// // Example sending a request using the CreateHttpNamespaceRequest method. 34// req, resp := client.CreateHttpNamespaceRequest(params) 35// 36// err := req.Send() 37// if err == nil { // resp is now filled 38// fmt.Println(resp) 39// } 40// 41// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace 42func (c *ServiceDiscovery) CreateHttpNamespaceRequest(input *CreateHttpNamespaceInput) (req *request.Request, output *CreateHttpNamespaceOutput) { 43 op := &request.Operation{ 44 Name: opCreateHttpNamespace, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateHttpNamespaceInput{} 51 } 52 53 output = &CreateHttpNamespaceOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// CreateHttpNamespace API operation for AWS Cloud Map. 59// 60// Creates an HTTP namespace. Service instances that you register using an HTTP 61// namespace can be discovered using a DiscoverInstances request but can't be 62// discovered using DNS. 63// 64// For the current limit on the number of namespaces that you can create using 65// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 66// in the AWS Cloud Map Developer Guide. 67// 68// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 69// with awserr.Error's Code and Message methods to get detailed information about 70// the error. 71// 72// See the AWS API reference guide for AWS Cloud Map's 73// API operation CreateHttpNamespace for usage and error information. 74// 75// Returned Error Codes: 76// * ErrCodeInvalidInput "InvalidInput" 77// One or more specified values aren't valid. For example, a required value 78// might be missing, a numeric value might be outside the allowed range, or 79// a string value might exceed length constraints. 80// 81// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" 82// The namespace that you're trying to create already exists. 83// 84// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" 85// The resource can't be created because you've reached the limit on the number 86// of resources. 87// 88// * ErrCodeDuplicateRequest "DuplicateRequest" 89// The operation is already in progress. 90// 91// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateHttpNamespace 92func (c *ServiceDiscovery) CreateHttpNamespace(input *CreateHttpNamespaceInput) (*CreateHttpNamespaceOutput, error) { 93 req, out := c.CreateHttpNamespaceRequest(input) 94 return out, req.Send() 95} 96 97// CreateHttpNamespaceWithContext is the same as CreateHttpNamespace with the addition of 98// the ability to pass a context and additional request options. 99// 100// See CreateHttpNamespace for details on how to use this API operation. 101// 102// The context must be non-nil and will be used for request cancellation. If 103// the context is nil a panic will occur. In the future the SDK may create 104// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 105// for more information on using Contexts. 106func (c *ServiceDiscovery) CreateHttpNamespaceWithContext(ctx aws.Context, input *CreateHttpNamespaceInput, opts ...request.Option) (*CreateHttpNamespaceOutput, error) { 107 req, out := c.CreateHttpNamespaceRequest(input) 108 req.SetContext(ctx) 109 req.ApplyOptions(opts...) 110 return out, req.Send() 111} 112 113const opCreatePrivateDnsNamespace = "CreatePrivateDnsNamespace" 114 115// CreatePrivateDnsNamespaceRequest generates a "aws/request.Request" representing the 116// client's request for the CreatePrivateDnsNamespace operation. The "output" return 117// value will be populated with the request's response once the request completes 118// successfully. 119// 120// Use "Send" method on the returned Request to send the API call to the service. 121// the "output" return value is not valid until after Send returns without error. 122// 123// See CreatePrivateDnsNamespace for more information on using the CreatePrivateDnsNamespace 124// API call, and error handling. 125// 126// This method is useful when you want to inject custom logic or configuration 127// into the SDK's request lifecycle. Such as custom headers, or retry logic. 128// 129// 130// // Example sending a request using the CreatePrivateDnsNamespaceRequest method. 131// req, resp := client.CreatePrivateDnsNamespaceRequest(params) 132// 133// err := req.Send() 134// if err == nil { // resp is now filled 135// fmt.Println(resp) 136// } 137// 138// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace 139func (c *ServiceDiscovery) CreatePrivateDnsNamespaceRequest(input *CreatePrivateDnsNamespaceInput) (req *request.Request, output *CreatePrivateDnsNamespaceOutput) { 140 op := &request.Operation{ 141 Name: opCreatePrivateDnsNamespace, 142 HTTPMethod: "POST", 143 HTTPPath: "/", 144 } 145 146 if input == nil { 147 input = &CreatePrivateDnsNamespaceInput{} 148 } 149 150 output = &CreatePrivateDnsNamespaceOutput{} 151 req = c.newRequest(op, input, output) 152 return 153} 154 155// CreatePrivateDnsNamespace API operation for AWS Cloud Map. 156// 157// Creates a private namespace based on DNS, which will be visible only inside 158// a specified Amazon VPC. The namespace defines your service naming scheme. 159// For example, if you name your namespace example.com and name your service 160// backend, the resulting DNS name for the service will be backend.example.com. 161// For the current limit on the number of namespaces that you can create using 162// the same AWS account, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 163// in the AWS Cloud Map Developer Guide. 164// 165// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 166// with awserr.Error's Code and Message methods to get detailed information about 167// the error. 168// 169// See the AWS API reference guide for AWS Cloud Map's 170// API operation CreatePrivateDnsNamespace for usage and error information. 171// 172// Returned Error Codes: 173// * ErrCodeInvalidInput "InvalidInput" 174// One or more specified values aren't valid. For example, a required value 175// might be missing, a numeric value might be outside the allowed range, or 176// a string value might exceed length constraints. 177// 178// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" 179// The namespace that you're trying to create already exists. 180// 181// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" 182// The resource can't be created because you've reached the limit on the number 183// of resources. 184// 185// * ErrCodeDuplicateRequest "DuplicateRequest" 186// The operation is already in progress. 187// 188// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePrivateDnsNamespace 189func (c *ServiceDiscovery) CreatePrivateDnsNamespace(input *CreatePrivateDnsNamespaceInput) (*CreatePrivateDnsNamespaceOutput, error) { 190 req, out := c.CreatePrivateDnsNamespaceRequest(input) 191 return out, req.Send() 192} 193 194// CreatePrivateDnsNamespaceWithContext is the same as CreatePrivateDnsNamespace with the addition of 195// the ability to pass a context and additional request options. 196// 197// See CreatePrivateDnsNamespace for details on how to use this API operation. 198// 199// The context must be non-nil and will be used for request cancellation. If 200// the context is nil a panic will occur. In the future the SDK may create 201// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 202// for more information on using Contexts. 203func (c *ServiceDiscovery) CreatePrivateDnsNamespaceWithContext(ctx aws.Context, input *CreatePrivateDnsNamespaceInput, opts ...request.Option) (*CreatePrivateDnsNamespaceOutput, error) { 204 req, out := c.CreatePrivateDnsNamespaceRequest(input) 205 req.SetContext(ctx) 206 req.ApplyOptions(opts...) 207 return out, req.Send() 208} 209 210const opCreatePublicDnsNamespace = "CreatePublicDnsNamespace" 211 212// CreatePublicDnsNamespaceRequest generates a "aws/request.Request" representing the 213// client's request for the CreatePublicDnsNamespace operation. The "output" return 214// value will be populated with the request's response once the request completes 215// successfully. 216// 217// Use "Send" method on the returned Request to send the API call to the service. 218// the "output" return value is not valid until after Send returns without error. 219// 220// See CreatePublicDnsNamespace for more information on using the CreatePublicDnsNamespace 221// API call, and error handling. 222// 223// This method is useful when you want to inject custom logic or configuration 224// into the SDK's request lifecycle. Such as custom headers, or retry logic. 225// 226// 227// // Example sending a request using the CreatePublicDnsNamespaceRequest method. 228// req, resp := client.CreatePublicDnsNamespaceRequest(params) 229// 230// err := req.Send() 231// if err == nil { // resp is now filled 232// fmt.Println(resp) 233// } 234// 235// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace 236func (c *ServiceDiscovery) CreatePublicDnsNamespaceRequest(input *CreatePublicDnsNamespaceInput) (req *request.Request, output *CreatePublicDnsNamespaceOutput) { 237 op := &request.Operation{ 238 Name: opCreatePublicDnsNamespace, 239 HTTPMethod: "POST", 240 HTTPPath: "/", 241 } 242 243 if input == nil { 244 input = &CreatePublicDnsNamespaceInput{} 245 } 246 247 output = &CreatePublicDnsNamespaceOutput{} 248 req = c.newRequest(op, input, output) 249 return 250} 251 252// CreatePublicDnsNamespace API operation for AWS Cloud Map. 253// 254// Creates a public namespace based on DNS, which will be visible on the internet. 255// The namespace defines your service naming scheme. For example, if you name 256// your namespace example.com and name your service backend, the resulting DNS 257// name for the service will be backend.example.com. For the current limit on 258// the number of namespaces that you can create using the same AWS account, 259// see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 260// in the AWS Cloud Map Developer Guide. 261// 262// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 263// with awserr.Error's Code and Message methods to get detailed information about 264// the error. 265// 266// See the AWS API reference guide for AWS Cloud Map's 267// API operation CreatePublicDnsNamespace for usage and error information. 268// 269// Returned Error Codes: 270// * ErrCodeInvalidInput "InvalidInput" 271// One or more specified values aren't valid. For example, a required value 272// might be missing, a numeric value might be outside the allowed range, or 273// a string value might exceed length constraints. 274// 275// * ErrCodeNamespaceAlreadyExists "NamespaceAlreadyExists" 276// The namespace that you're trying to create already exists. 277// 278// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" 279// The resource can't be created because you've reached the limit on the number 280// of resources. 281// 282// * ErrCodeDuplicateRequest "DuplicateRequest" 283// The operation is already in progress. 284// 285// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreatePublicDnsNamespace 286func (c *ServiceDiscovery) CreatePublicDnsNamespace(input *CreatePublicDnsNamespaceInput) (*CreatePublicDnsNamespaceOutput, error) { 287 req, out := c.CreatePublicDnsNamespaceRequest(input) 288 return out, req.Send() 289} 290 291// CreatePublicDnsNamespaceWithContext is the same as CreatePublicDnsNamespace with the addition of 292// the ability to pass a context and additional request options. 293// 294// See CreatePublicDnsNamespace for details on how to use this API operation. 295// 296// The context must be non-nil and will be used for request cancellation. If 297// the context is nil a panic will occur. In the future the SDK may create 298// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 299// for more information on using Contexts. 300func (c *ServiceDiscovery) CreatePublicDnsNamespaceWithContext(ctx aws.Context, input *CreatePublicDnsNamespaceInput, opts ...request.Option) (*CreatePublicDnsNamespaceOutput, error) { 301 req, out := c.CreatePublicDnsNamespaceRequest(input) 302 req.SetContext(ctx) 303 req.ApplyOptions(opts...) 304 return out, req.Send() 305} 306 307const opCreateService = "CreateService" 308 309// CreateServiceRequest generates a "aws/request.Request" representing the 310// client's request for the CreateService operation. The "output" return 311// value will be populated with the request's response once the request completes 312// successfully. 313// 314// Use "Send" method on the returned Request to send the API call to the service. 315// the "output" return value is not valid until after Send returns without error. 316// 317// See CreateService for more information on using the CreateService 318// API call, and error handling. 319// 320// This method is useful when you want to inject custom logic or configuration 321// into the SDK's request lifecycle. Such as custom headers, or retry logic. 322// 323// 324// // Example sending a request using the CreateServiceRequest method. 325// req, resp := client.CreateServiceRequest(params) 326// 327// err := req.Send() 328// if err == nil { // resp is now filled 329// fmt.Println(resp) 330// } 331// 332// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService 333func (c *ServiceDiscovery) CreateServiceRequest(input *CreateServiceInput) (req *request.Request, output *CreateServiceOutput) { 334 op := &request.Operation{ 335 Name: opCreateService, 336 HTTPMethod: "POST", 337 HTTPPath: "/", 338 } 339 340 if input == nil { 341 input = &CreateServiceInput{} 342 } 343 344 output = &CreateServiceOutput{} 345 req = c.newRequest(op, input, output) 346 return 347} 348 349// CreateService API operation for AWS Cloud Map. 350// 351// Creates a service, which defines the configuration for the following entities: 352// 353// * For public and private DNS namespaces, one of the following combinations 354// of DNS records in Amazon Route 53: A AAAA A and AAAA SRV CNAME 355// 356// * Optionally, a health check 357// 358// After you create the service, you can submit a RegisterInstance request, 359// and AWS Cloud Map uses the values in the configuration to create the specified 360// entities. 361// 362// For the current limit on the number of instances that you can register using 363// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 364// in the AWS Cloud Map Developer Guide. 365// 366// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 367// with awserr.Error's Code and Message methods to get detailed information about 368// the error. 369// 370// See the AWS API reference guide for AWS Cloud Map's 371// API operation CreateService for usage and error information. 372// 373// Returned Error Codes: 374// * ErrCodeInvalidInput "InvalidInput" 375// One or more specified values aren't valid. For example, a required value 376// might be missing, a numeric value might be outside the allowed range, or 377// a string value might exceed length constraints. 378// 379// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" 380// The resource can't be created because you've reached the limit on the number 381// of resources. 382// 383// * ErrCodeNamespaceNotFound "NamespaceNotFound" 384// No namespace exists with the specified ID. 385// 386// * ErrCodeServiceAlreadyExists "ServiceAlreadyExists" 387// The service can't be created because a service with the same name already 388// exists. 389// 390// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/CreateService 391func (c *ServiceDiscovery) CreateService(input *CreateServiceInput) (*CreateServiceOutput, error) { 392 req, out := c.CreateServiceRequest(input) 393 return out, req.Send() 394} 395 396// CreateServiceWithContext is the same as CreateService with the addition of 397// the ability to pass a context and additional request options. 398// 399// See CreateService for details on how to use this API operation. 400// 401// The context must be non-nil and will be used for request cancellation. If 402// the context is nil a panic will occur. In the future the SDK may create 403// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 404// for more information on using Contexts. 405func (c *ServiceDiscovery) CreateServiceWithContext(ctx aws.Context, input *CreateServiceInput, opts ...request.Option) (*CreateServiceOutput, error) { 406 req, out := c.CreateServiceRequest(input) 407 req.SetContext(ctx) 408 req.ApplyOptions(opts...) 409 return out, req.Send() 410} 411 412const opDeleteNamespace = "DeleteNamespace" 413 414// DeleteNamespaceRequest generates a "aws/request.Request" representing the 415// client's request for the DeleteNamespace operation. The "output" return 416// value will be populated with the request's response once the request completes 417// successfully. 418// 419// Use "Send" method on the returned Request to send the API call to the service. 420// the "output" return value is not valid until after Send returns without error. 421// 422// See DeleteNamespace for more information on using the DeleteNamespace 423// API call, and error handling. 424// 425// This method is useful when you want to inject custom logic or configuration 426// into the SDK's request lifecycle. Such as custom headers, or retry logic. 427// 428// 429// // Example sending a request using the DeleteNamespaceRequest method. 430// req, resp := client.DeleteNamespaceRequest(params) 431// 432// err := req.Send() 433// if err == nil { // resp is now filled 434// fmt.Println(resp) 435// } 436// 437// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace 438func (c *ServiceDiscovery) DeleteNamespaceRequest(input *DeleteNamespaceInput) (req *request.Request, output *DeleteNamespaceOutput) { 439 op := &request.Operation{ 440 Name: opDeleteNamespace, 441 HTTPMethod: "POST", 442 HTTPPath: "/", 443 } 444 445 if input == nil { 446 input = &DeleteNamespaceInput{} 447 } 448 449 output = &DeleteNamespaceOutput{} 450 req = c.newRequest(op, input, output) 451 return 452} 453 454// DeleteNamespace API operation for AWS Cloud Map. 455// 456// Deletes a namespace from the current account. If the namespace still contains 457// one or more services, the request fails. 458// 459// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 460// with awserr.Error's Code and Message methods to get detailed information about 461// the error. 462// 463// See the AWS API reference guide for AWS Cloud Map's 464// API operation DeleteNamespace for usage and error information. 465// 466// Returned Error Codes: 467// * ErrCodeInvalidInput "InvalidInput" 468// One or more specified values aren't valid. For example, a required value 469// might be missing, a numeric value might be outside the allowed range, or 470// a string value might exceed length constraints. 471// 472// * ErrCodeNamespaceNotFound "NamespaceNotFound" 473// No namespace exists with the specified ID. 474// 475// * ErrCodeResourceInUse "ResourceInUse" 476// The specified resource can't be deleted because it contains other resources. 477// For example, you can't delete a service that contains any instances. 478// 479// * ErrCodeDuplicateRequest "DuplicateRequest" 480// The operation is already in progress. 481// 482// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteNamespace 483func (c *ServiceDiscovery) DeleteNamespace(input *DeleteNamespaceInput) (*DeleteNamespaceOutput, error) { 484 req, out := c.DeleteNamespaceRequest(input) 485 return out, req.Send() 486} 487 488// DeleteNamespaceWithContext is the same as DeleteNamespace with the addition of 489// the ability to pass a context and additional request options. 490// 491// See DeleteNamespace for details on how to use this API operation. 492// 493// The context must be non-nil and will be used for request cancellation. If 494// the context is nil a panic will occur. In the future the SDK may create 495// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 496// for more information on using Contexts. 497func (c *ServiceDiscovery) DeleteNamespaceWithContext(ctx aws.Context, input *DeleteNamespaceInput, opts ...request.Option) (*DeleteNamespaceOutput, error) { 498 req, out := c.DeleteNamespaceRequest(input) 499 req.SetContext(ctx) 500 req.ApplyOptions(opts...) 501 return out, req.Send() 502} 503 504const opDeleteService = "DeleteService" 505 506// DeleteServiceRequest generates a "aws/request.Request" representing the 507// client's request for the DeleteService operation. The "output" return 508// value will be populated with the request's response once the request completes 509// successfully. 510// 511// Use "Send" method on the returned Request to send the API call to the service. 512// the "output" return value is not valid until after Send returns without error. 513// 514// See DeleteService for more information on using the DeleteService 515// API call, and error handling. 516// 517// This method is useful when you want to inject custom logic or configuration 518// into the SDK's request lifecycle. Such as custom headers, or retry logic. 519// 520// 521// // Example sending a request using the DeleteServiceRequest method. 522// req, resp := client.DeleteServiceRequest(params) 523// 524// err := req.Send() 525// if err == nil { // resp is now filled 526// fmt.Println(resp) 527// } 528// 529// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService 530func (c *ServiceDiscovery) DeleteServiceRequest(input *DeleteServiceInput) (req *request.Request, output *DeleteServiceOutput) { 531 op := &request.Operation{ 532 Name: opDeleteService, 533 HTTPMethod: "POST", 534 HTTPPath: "/", 535 } 536 537 if input == nil { 538 input = &DeleteServiceInput{} 539 } 540 541 output = &DeleteServiceOutput{} 542 req = c.newRequest(op, input, output) 543 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 544 return 545} 546 547// DeleteService API operation for AWS Cloud Map. 548// 549// Deletes a specified service. If the service still contains one or more registered 550// instances, the request fails. 551// 552// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 553// with awserr.Error's Code and Message methods to get detailed information about 554// the error. 555// 556// See the AWS API reference guide for AWS Cloud Map's 557// API operation DeleteService for usage and error information. 558// 559// Returned Error Codes: 560// * ErrCodeInvalidInput "InvalidInput" 561// One or more specified values aren't valid. For example, a required value 562// might be missing, a numeric value might be outside the allowed range, or 563// a string value might exceed length constraints. 564// 565// * ErrCodeServiceNotFound "ServiceNotFound" 566// No service exists with the specified ID. 567// 568// * ErrCodeResourceInUse "ResourceInUse" 569// The specified resource can't be deleted because it contains other resources. 570// For example, you can't delete a service that contains any instances. 571// 572// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeleteService 573func (c *ServiceDiscovery) DeleteService(input *DeleteServiceInput) (*DeleteServiceOutput, error) { 574 req, out := c.DeleteServiceRequest(input) 575 return out, req.Send() 576} 577 578// DeleteServiceWithContext is the same as DeleteService with the addition of 579// the ability to pass a context and additional request options. 580// 581// See DeleteService for details on how to use this API operation. 582// 583// The context must be non-nil and will be used for request cancellation. If 584// the context is nil a panic will occur. In the future the SDK may create 585// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 586// for more information on using Contexts. 587func (c *ServiceDiscovery) DeleteServiceWithContext(ctx aws.Context, input *DeleteServiceInput, opts ...request.Option) (*DeleteServiceOutput, error) { 588 req, out := c.DeleteServiceRequest(input) 589 req.SetContext(ctx) 590 req.ApplyOptions(opts...) 591 return out, req.Send() 592} 593 594const opDeregisterInstance = "DeregisterInstance" 595 596// DeregisterInstanceRequest generates a "aws/request.Request" representing the 597// client's request for the DeregisterInstance operation. The "output" return 598// value will be populated with the request's response once the request completes 599// successfully. 600// 601// Use "Send" method on the returned Request to send the API call to the service. 602// the "output" return value is not valid until after Send returns without error. 603// 604// See DeregisterInstance for more information on using the DeregisterInstance 605// API call, and error handling. 606// 607// This method is useful when you want to inject custom logic or configuration 608// into the SDK's request lifecycle. Such as custom headers, or retry logic. 609// 610// 611// // Example sending a request using the DeregisterInstanceRequest method. 612// req, resp := client.DeregisterInstanceRequest(params) 613// 614// err := req.Send() 615// if err == nil { // resp is now filled 616// fmt.Println(resp) 617// } 618// 619// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance 620func (c *ServiceDiscovery) DeregisterInstanceRequest(input *DeregisterInstanceInput) (req *request.Request, output *DeregisterInstanceOutput) { 621 op := &request.Operation{ 622 Name: opDeregisterInstance, 623 HTTPMethod: "POST", 624 HTTPPath: "/", 625 } 626 627 if input == nil { 628 input = &DeregisterInstanceInput{} 629 } 630 631 output = &DeregisterInstanceOutput{} 632 req = c.newRequest(op, input, output) 633 return 634} 635 636// DeregisterInstance API operation for AWS Cloud Map. 637// 638// Deletes the Amazon Route 53 DNS records and health check, if any, that AWS 639// Cloud Map created for the specified instance. 640// 641// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 642// with awserr.Error's Code and Message methods to get detailed information about 643// the error. 644// 645// See the AWS API reference guide for AWS Cloud Map's 646// API operation DeregisterInstance for usage and error information. 647// 648// Returned Error Codes: 649// * ErrCodeDuplicateRequest "DuplicateRequest" 650// The operation is already in progress. 651// 652// * ErrCodeInvalidInput "InvalidInput" 653// One or more specified values aren't valid. For example, a required value 654// might be missing, a numeric value might be outside the allowed range, or 655// a string value might exceed length constraints. 656// 657// * ErrCodeInstanceNotFound "InstanceNotFound" 658// No instance exists with the specified ID, or the instance was recently registered, 659// and information about the instance hasn't propagated yet. 660// 661// * ErrCodeResourceInUse "ResourceInUse" 662// The specified resource can't be deleted because it contains other resources. 663// For example, you can't delete a service that contains any instances. 664// 665// * ErrCodeServiceNotFound "ServiceNotFound" 666// No service exists with the specified ID. 667// 668// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DeregisterInstance 669func (c *ServiceDiscovery) DeregisterInstance(input *DeregisterInstanceInput) (*DeregisterInstanceOutput, error) { 670 req, out := c.DeregisterInstanceRequest(input) 671 return out, req.Send() 672} 673 674// DeregisterInstanceWithContext is the same as DeregisterInstance with the addition of 675// the ability to pass a context and additional request options. 676// 677// See DeregisterInstance for details on how to use this API operation. 678// 679// The context must be non-nil and will be used for request cancellation. If 680// the context is nil a panic will occur. In the future the SDK may create 681// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 682// for more information on using Contexts. 683func (c *ServiceDiscovery) DeregisterInstanceWithContext(ctx aws.Context, input *DeregisterInstanceInput, opts ...request.Option) (*DeregisterInstanceOutput, error) { 684 req, out := c.DeregisterInstanceRequest(input) 685 req.SetContext(ctx) 686 req.ApplyOptions(opts...) 687 return out, req.Send() 688} 689 690const opDiscoverInstances = "DiscoverInstances" 691 692// DiscoverInstancesRequest generates a "aws/request.Request" representing the 693// client's request for the DiscoverInstances operation. The "output" return 694// value will be populated with the request's response once the request completes 695// successfully. 696// 697// Use "Send" method on the returned Request to send the API call to the service. 698// the "output" return value is not valid until after Send returns without error. 699// 700// See DiscoverInstances for more information on using the DiscoverInstances 701// API call, and error handling. 702// 703// This method is useful when you want to inject custom logic or configuration 704// into the SDK's request lifecycle. Such as custom headers, or retry logic. 705// 706// 707// // Example sending a request using the DiscoverInstancesRequest method. 708// req, resp := client.DiscoverInstancesRequest(params) 709// 710// err := req.Send() 711// if err == nil { // resp is now filled 712// fmt.Println(resp) 713// } 714// 715// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances 716func (c *ServiceDiscovery) DiscoverInstancesRequest(input *DiscoverInstancesInput) (req *request.Request, output *DiscoverInstancesOutput) { 717 op := &request.Operation{ 718 Name: opDiscoverInstances, 719 HTTPMethod: "POST", 720 HTTPPath: "/", 721 } 722 723 if input == nil { 724 input = &DiscoverInstancesInput{} 725 } 726 727 output = &DiscoverInstancesOutput{} 728 req = c.newRequest(op, input, output) 729 req.Handlers.Build.PushBackNamed(protocol.NewHostPrefixHandler("data-", nil)) 730 req.Handlers.Build.PushBackNamed(protocol.ValidateEndpointHostHandler) 731 return 732} 733 734// DiscoverInstances API operation for AWS Cloud Map. 735// 736// Discovers registered instances for a specified namespace and service. 737// 738// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 739// with awserr.Error's Code and Message methods to get detailed information about 740// the error. 741// 742// See the AWS API reference guide for AWS Cloud Map's 743// API operation DiscoverInstances for usage and error information. 744// 745// Returned Error Codes: 746// * ErrCodeServiceNotFound "ServiceNotFound" 747// No service exists with the specified ID. 748// 749// * ErrCodeNamespaceNotFound "NamespaceNotFound" 750// No namespace exists with the specified ID. 751// 752// * ErrCodeInvalidInput "InvalidInput" 753// One or more specified values aren't valid. For example, a required value 754// might be missing, a numeric value might be outside the allowed range, or 755// a string value might exceed length constraints. 756// 757// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/DiscoverInstances 758func (c *ServiceDiscovery) DiscoverInstances(input *DiscoverInstancesInput) (*DiscoverInstancesOutput, error) { 759 req, out := c.DiscoverInstancesRequest(input) 760 return out, req.Send() 761} 762 763// DiscoverInstancesWithContext is the same as DiscoverInstances with the addition of 764// the ability to pass a context and additional request options. 765// 766// See DiscoverInstances for details on how to use this API operation. 767// 768// The context must be non-nil and will be used for request cancellation. If 769// the context is nil a panic will occur. In the future the SDK may create 770// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 771// for more information on using Contexts. 772func (c *ServiceDiscovery) DiscoverInstancesWithContext(ctx aws.Context, input *DiscoverInstancesInput, opts ...request.Option) (*DiscoverInstancesOutput, error) { 773 req, out := c.DiscoverInstancesRequest(input) 774 req.SetContext(ctx) 775 req.ApplyOptions(opts...) 776 return out, req.Send() 777} 778 779const opGetInstance = "GetInstance" 780 781// GetInstanceRequest generates a "aws/request.Request" representing the 782// client's request for the GetInstance operation. The "output" return 783// value will be populated with the request's response once the request completes 784// successfully. 785// 786// Use "Send" method on the returned Request to send the API call to the service. 787// the "output" return value is not valid until after Send returns without error. 788// 789// See GetInstance for more information on using the GetInstance 790// API call, and error handling. 791// 792// This method is useful when you want to inject custom logic or configuration 793// into the SDK's request lifecycle. Such as custom headers, or retry logic. 794// 795// 796// // Example sending a request using the GetInstanceRequest method. 797// req, resp := client.GetInstanceRequest(params) 798// 799// err := req.Send() 800// if err == nil { // resp is now filled 801// fmt.Println(resp) 802// } 803// 804// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance 805func (c *ServiceDiscovery) GetInstanceRequest(input *GetInstanceInput) (req *request.Request, output *GetInstanceOutput) { 806 op := &request.Operation{ 807 Name: opGetInstance, 808 HTTPMethod: "POST", 809 HTTPPath: "/", 810 } 811 812 if input == nil { 813 input = &GetInstanceInput{} 814 } 815 816 output = &GetInstanceOutput{} 817 req = c.newRequest(op, input, output) 818 return 819} 820 821// GetInstance API operation for AWS Cloud Map. 822// 823// Gets information about a specified instance. 824// 825// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 826// with awserr.Error's Code and Message methods to get detailed information about 827// the error. 828// 829// See the AWS API reference guide for AWS Cloud Map's 830// API operation GetInstance for usage and error information. 831// 832// Returned Error Codes: 833// * ErrCodeInstanceNotFound "InstanceNotFound" 834// No instance exists with the specified ID, or the instance was recently registered, 835// and information about the instance hasn't propagated yet. 836// 837// * ErrCodeInvalidInput "InvalidInput" 838// One or more specified values aren't valid. For example, a required value 839// might be missing, a numeric value might be outside the allowed range, or 840// a string value might exceed length constraints. 841// 842// * ErrCodeServiceNotFound "ServiceNotFound" 843// No service exists with the specified ID. 844// 845// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstance 846func (c *ServiceDiscovery) GetInstance(input *GetInstanceInput) (*GetInstanceOutput, error) { 847 req, out := c.GetInstanceRequest(input) 848 return out, req.Send() 849} 850 851// GetInstanceWithContext is the same as GetInstance with the addition of 852// the ability to pass a context and additional request options. 853// 854// See GetInstance for details on how to use this API operation. 855// 856// The context must be non-nil and will be used for request cancellation. If 857// the context is nil a panic will occur. In the future the SDK may create 858// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 859// for more information on using Contexts. 860func (c *ServiceDiscovery) GetInstanceWithContext(ctx aws.Context, input *GetInstanceInput, opts ...request.Option) (*GetInstanceOutput, error) { 861 req, out := c.GetInstanceRequest(input) 862 req.SetContext(ctx) 863 req.ApplyOptions(opts...) 864 return out, req.Send() 865} 866 867const opGetInstancesHealthStatus = "GetInstancesHealthStatus" 868 869// GetInstancesHealthStatusRequest generates a "aws/request.Request" representing the 870// client's request for the GetInstancesHealthStatus operation. The "output" return 871// value will be populated with the request's response once the request completes 872// successfully. 873// 874// Use "Send" method on the returned Request to send the API call to the service. 875// the "output" return value is not valid until after Send returns without error. 876// 877// See GetInstancesHealthStatus for more information on using the GetInstancesHealthStatus 878// API call, and error handling. 879// 880// This method is useful when you want to inject custom logic or configuration 881// into the SDK's request lifecycle. Such as custom headers, or retry logic. 882// 883// 884// // Example sending a request using the GetInstancesHealthStatusRequest method. 885// req, resp := client.GetInstancesHealthStatusRequest(params) 886// 887// err := req.Send() 888// if err == nil { // resp is now filled 889// fmt.Println(resp) 890// } 891// 892// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus 893func (c *ServiceDiscovery) GetInstancesHealthStatusRequest(input *GetInstancesHealthStatusInput) (req *request.Request, output *GetInstancesHealthStatusOutput) { 894 op := &request.Operation{ 895 Name: opGetInstancesHealthStatus, 896 HTTPMethod: "POST", 897 HTTPPath: "/", 898 Paginator: &request.Paginator{ 899 InputTokens: []string{"NextToken"}, 900 OutputTokens: []string{"NextToken"}, 901 LimitToken: "MaxResults", 902 TruncationToken: "", 903 }, 904 } 905 906 if input == nil { 907 input = &GetInstancesHealthStatusInput{} 908 } 909 910 output = &GetInstancesHealthStatusOutput{} 911 req = c.newRequest(op, input, output) 912 return 913} 914 915// GetInstancesHealthStatus API operation for AWS Cloud Map. 916// 917// Gets the current health status (Healthy, Unhealthy, or Unknown) of one or 918// more instances that are associated with a specified service. 919// 920// There is a brief delay between when you register an instance and when the 921// health status for the instance is available. 922// 923// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 924// with awserr.Error's Code and Message methods to get detailed information about 925// the error. 926// 927// See the AWS API reference guide for AWS Cloud Map's 928// API operation GetInstancesHealthStatus for usage and error information. 929// 930// Returned Error Codes: 931// * ErrCodeInstanceNotFound "InstanceNotFound" 932// No instance exists with the specified ID, or the instance was recently registered, 933// and information about the instance hasn't propagated yet. 934// 935// * ErrCodeInvalidInput "InvalidInput" 936// One or more specified values aren't valid. For example, a required value 937// might be missing, a numeric value might be outside the allowed range, or 938// a string value might exceed length constraints. 939// 940// * ErrCodeServiceNotFound "ServiceNotFound" 941// No service exists with the specified ID. 942// 943// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetInstancesHealthStatus 944func (c *ServiceDiscovery) GetInstancesHealthStatus(input *GetInstancesHealthStatusInput) (*GetInstancesHealthStatusOutput, error) { 945 req, out := c.GetInstancesHealthStatusRequest(input) 946 return out, req.Send() 947} 948 949// GetInstancesHealthStatusWithContext is the same as GetInstancesHealthStatus with the addition of 950// the ability to pass a context and additional request options. 951// 952// See GetInstancesHealthStatus for details on how to use this API operation. 953// 954// The context must be non-nil and will be used for request cancellation. If 955// the context is nil a panic will occur. In the future the SDK may create 956// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 957// for more information on using Contexts. 958func (c *ServiceDiscovery) GetInstancesHealthStatusWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, opts ...request.Option) (*GetInstancesHealthStatusOutput, error) { 959 req, out := c.GetInstancesHealthStatusRequest(input) 960 req.SetContext(ctx) 961 req.ApplyOptions(opts...) 962 return out, req.Send() 963} 964 965// GetInstancesHealthStatusPages iterates over the pages of a GetInstancesHealthStatus operation, 966// calling the "fn" function with the response data for each page. To stop 967// iterating, return false from the fn function. 968// 969// See GetInstancesHealthStatus method for more information on how to use this operation. 970// 971// Note: This operation can generate multiple requests to a service. 972// 973// // Example iterating over at most 3 pages of a GetInstancesHealthStatus operation. 974// pageNum := 0 975// err := client.GetInstancesHealthStatusPages(params, 976// func(page *servicediscovery.GetInstancesHealthStatusOutput, lastPage bool) bool { 977// pageNum++ 978// fmt.Println(page) 979// return pageNum <= 3 980// }) 981// 982func (c *ServiceDiscovery) GetInstancesHealthStatusPages(input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool) error { 983 return c.GetInstancesHealthStatusPagesWithContext(aws.BackgroundContext(), input, fn) 984} 985 986// GetInstancesHealthStatusPagesWithContext same as GetInstancesHealthStatusPages except 987// it takes a Context and allows setting request options on the pages. 988// 989// The context must be non-nil and will be used for request cancellation. If 990// the context is nil a panic will occur. In the future the SDK may create 991// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 992// for more information on using Contexts. 993func (c *ServiceDiscovery) GetInstancesHealthStatusPagesWithContext(ctx aws.Context, input *GetInstancesHealthStatusInput, fn func(*GetInstancesHealthStatusOutput, bool) bool, opts ...request.Option) error { 994 p := request.Pagination{ 995 NewRequest: func() (*request.Request, error) { 996 var inCpy *GetInstancesHealthStatusInput 997 if input != nil { 998 tmp := *input 999 inCpy = &tmp 1000 } 1001 req, _ := c.GetInstancesHealthStatusRequest(inCpy) 1002 req.SetContext(ctx) 1003 req.ApplyOptions(opts...) 1004 return req, nil 1005 }, 1006 } 1007 1008 cont := true 1009 for p.Next() && cont { 1010 cont = fn(p.Page().(*GetInstancesHealthStatusOutput), !p.HasNextPage()) 1011 } 1012 return p.Err() 1013} 1014 1015const opGetNamespace = "GetNamespace" 1016 1017// GetNamespaceRequest generates a "aws/request.Request" representing the 1018// client's request for the GetNamespace operation. The "output" return 1019// value will be populated with the request's response once the request completes 1020// successfully. 1021// 1022// Use "Send" method on the returned Request to send the API call to the service. 1023// the "output" return value is not valid until after Send returns without error. 1024// 1025// See GetNamespace for more information on using the GetNamespace 1026// API call, and error handling. 1027// 1028// This method is useful when you want to inject custom logic or configuration 1029// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1030// 1031// 1032// // Example sending a request using the GetNamespaceRequest method. 1033// req, resp := client.GetNamespaceRequest(params) 1034// 1035// err := req.Send() 1036// if err == nil { // resp is now filled 1037// fmt.Println(resp) 1038// } 1039// 1040// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace 1041func (c *ServiceDiscovery) GetNamespaceRequest(input *GetNamespaceInput) (req *request.Request, output *GetNamespaceOutput) { 1042 op := &request.Operation{ 1043 Name: opGetNamespace, 1044 HTTPMethod: "POST", 1045 HTTPPath: "/", 1046 } 1047 1048 if input == nil { 1049 input = &GetNamespaceInput{} 1050 } 1051 1052 output = &GetNamespaceOutput{} 1053 req = c.newRequest(op, input, output) 1054 return 1055} 1056 1057// GetNamespace API operation for AWS Cloud Map. 1058// 1059// Gets information about a namespace. 1060// 1061// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1062// with awserr.Error's Code and Message methods to get detailed information about 1063// the error. 1064// 1065// See the AWS API reference guide for AWS Cloud Map's 1066// API operation GetNamespace for usage and error information. 1067// 1068// Returned Error Codes: 1069// * ErrCodeInvalidInput "InvalidInput" 1070// One or more specified values aren't valid. For example, a required value 1071// might be missing, a numeric value might be outside the allowed range, or 1072// a string value might exceed length constraints. 1073// 1074// * ErrCodeNamespaceNotFound "NamespaceNotFound" 1075// No namespace exists with the specified ID. 1076// 1077// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetNamespace 1078func (c *ServiceDiscovery) GetNamespace(input *GetNamespaceInput) (*GetNamespaceOutput, error) { 1079 req, out := c.GetNamespaceRequest(input) 1080 return out, req.Send() 1081} 1082 1083// GetNamespaceWithContext is the same as GetNamespace with the addition of 1084// the ability to pass a context and additional request options. 1085// 1086// See GetNamespace for details on how to use this API operation. 1087// 1088// The context must be non-nil and will be used for request cancellation. If 1089// the context is nil a panic will occur. In the future the SDK may create 1090// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1091// for more information on using Contexts. 1092func (c *ServiceDiscovery) GetNamespaceWithContext(ctx aws.Context, input *GetNamespaceInput, opts ...request.Option) (*GetNamespaceOutput, error) { 1093 req, out := c.GetNamespaceRequest(input) 1094 req.SetContext(ctx) 1095 req.ApplyOptions(opts...) 1096 return out, req.Send() 1097} 1098 1099const opGetOperation = "GetOperation" 1100 1101// GetOperationRequest generates a "aws/request.Request" representing the 1102// client's request for the GetOperation operation. The "output" return 1103// value will be populated with the request's response once the request completes 1104// successfully. 1105// 1106// Use "Send" method on the returned Request to send the API call to the service. 1107// the "output" return value is not valid until after Send returns without error. 1108// 1109// See GetOperation for more information on using the GetOperation 1110// API call, and error handling. 1111// 1112// This method is useful when you want to inject custom logic or configuration 1113// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1114// 1115// 1116// // Example sending a request using the GetOperationRequest method. 1117// req, resp := client.GetOperationRequest(params) 1118// 1119// err := req.Send() 1120// if err == nil { // resp is now filled 1121// fmt.Println(resp) 1122// } 1123// 1124// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation 1125func (c *ServiceDiscovery) GetOperationRequest(input *GetOperationInput) (req *request.Request, output *GetOperationOutput) { 1126 op := &request.Operation{ 1127 Name: opGetOperation, 1128 HTTPMethod: "POST", 1129 HTTPPath: "/", 1130 } 1131 1132 if input == nil { 1133 input = &GetOperationInput{} 1134 } 1135 1136 output = &GetOperationOutput{} 1137 req = c.newRequest(op, input, output) 1138 return 1139} 1140 1141// GetOperation API operation for AWS Cloud Map. 1142// 1143// Gets information about any operation that returns an operation ID in the 1144// response, such as a CreateService request. 1145// 1146// To get a list of operations that match specified criteria, see ListOperations. 1147// 1148// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1149// with awserr.Error's Code and Message methods to get detailed information about 1150// the error. 1151// 1152// See the AWS API reference guide for AWS Cloud Map's 1153// API operation GetOperation for usage and error information. 1154// 1155// Returned Error Codes: 1156// * ErrCodeInvalidInput "InvalidInput" 1157// One or more specified values aren't valid. For example, a required value 1158// might be missing, a numeric value might be outside the allowed range, or 1159// a string value might exceed length constraints. 1160// 1161// * ErrCodeOperationNotFound "OperationNotFound" 1162// No operation exists with the specified ID. 1163// 1164// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetOperation 1165func (c *ServiceDiscovery) GetOperation(input *GetOperationInput) (*GetOperationOutput, error) { 1166 req, out := c.GetOperationRequest(input) 1167 return out, req.Send() 1168} 1169 1170// GetOperationWithContext is the same as GetOperation with the addition of 1171// the ability to pass a context and additional request options. 1172// 1173// See GetOperation for details on how to use this API operation. 1174// 1175// The context must be non-nil and will be used for request cancellation. If 1176// the context is nil a panic will occur. In the future the SDK may create 1177// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1178// for more information on using Contexts. 1179func (c *ServiceDiscovery) GetOperationWithContext(ctx aws.Context, input *GetOperationInput, opts ...request.Option) (*GetOperationOutput, error) { 1180 req, out := c.GetOperationRequest(input) 1181 req.SetContext(ctx) 1182 req.ApplyOptions(opts...) 1183 return out, req.Send() 1184} 1185 1186const opGetService = "GetService" 1187 1188// GetServiceRequest generates a "aws/request.Request" representing the 1189// client's request for the GetService operation. The "output" return 1190// value will be populated with the request's response once the request completes 1191// successfully. 1192// 1193// Use "Send" method on the returned Request to send the API call to the service. 1194// the "output" return value is not valid until after Send returns without error. 1195// 1196// See GetService for more information on using the GetService 1197// API call, and error handling. 1198// 1199// This method is useful when you want to inject custom logic or configuration 1200// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1201// 1202// 1203// // Example sending a request using the GetServiceRequest method. 1204// req, resp := client.GetServiceRequest(params) 1205// 1206// err := req.Send() 1207// if err == nil { // resp is now filled 1208// fmt.Println(resp) 1209// } 1210// 1211// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService 1212func (c *ServiceDiscovery) GetServiceRequest(input *GetServiceInput) (req *request.Request, output *GetServiceOutput) { 1213 op := &request.Operation{ 1214 Name: opGetService, 1215 HTTPMethod: "POST", 1216 HTTPPath: "/", 1217 } 1218 1219 if input == nil { 1220 input = &GetServiceInput{} 1221 } 1222 1223 output = &GetServiceOutput{} 1224 req = c.newRequest(op, input, output) 1225 return 1226} 1227 1228// GetService API operation for AWS Cloud Map. 1229// 1230// Gets the settings for a specified service. 1231// 1232// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1233// with awserr.Error's Code and Message methods to get detailed information about 1234// the error. 1235// 1236// See the AWS API reference guide for AWS Cloud Map's 1237// API operation GetService for usage and error information. 1238// 1239// Returned Error Codes: 1240// * ErrCodeInvalidInput "InvalidInput" 1241// One or more specified values aren't valid. For example, a required value 1242// might be missing, a numeric value might be outside the allowed range, or 1243// a string value might exceed length constraints. 1244// 1245// * ErrCodeServiceNotFound "ServiceNotFound" 1246// No service exists with the specified ID. 1247// 1248// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/GetService 1249func (c *ServiceDiscovery) GetService(input *GetServiceInput) (*GetServiceOutput, error) { 1250 req, out := c.GetServiceRequest(input) 1251 return out, req.Send() 1252} 1253 1254// GetServiceWithContext is the same as GetService with the addition of 1255// the ability to pass a context and additional request options. 1256// 1257// See GetService for details on how to use this API operation. 1258// 1259// The context must be non-nil and will be used for request cancellation. If 1260// the context is nil a panic will occur. In the future the SDK may create 1261// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1262// for more information on using Contexts. 1263func (c *ServiceDiscovery) GetServiceWithContext(ctx aws.Context, input *GetServiceInput, opts ...request.Option) (*GetServiceOutput, error) { 1264 req, out := c.GetServiceRequest(input) 1265 req.SetContext(ctx) 1266 req.ApplyOptions(opts...) 1267 return out, req.Send() 1268} 1269 1270const opListInstances = "ListInstances" 1271 1272// ListInstancesRequest generates a "aws/request.Request" representing the 1273// client's request for the ListInstances operation. The "output" return 1274// value will be populated with the request's response once the request completes 1275// successfully. 1276// 1277// Use "Send" method on the returned Request to send the API call to the service. 1278// the "output" return value is not valid until after Send returns without error. 1279// 1280// See ListInstances for more information on using the ListInstances 1281// API call, and error handling. 1282// 1283// This method is useful when you want to inject custom logic or configuration 1284// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1285// 1286// 1287// // Example sending a request using the ListInstancesRequest method. 1288// req, resp := client.ListInstancesRequest(params) 1289// 1290// err := req.Send() 1291// if err == nil { // resp is now filled 1292// fmt.Println(resp) 1293// } 1294// 1295// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances 1296func (c *ServiceDiscovery) ListInstancesRequest(input *ListInstancesInput) (req *request.Request, output *ListInstancesOutput) { 1297 op := &request.Operation{ 1298 Name: opListInstances, 1299 HTTPMethod: "POST", 1300 HTTPPath: "/", 1301 Paginator: &request.Paginator{ 1302 InputTokens: []string{"NextToken"}, 1303 OutputTokens: []string{"NextToken"}, 1304 LimitToken: "MaxResults", 1305 TruncationToken: "", 1306 }, 1307 } 1308 1309 if input == nil { 1310 input = &ListInstancesInput{} 1311 } 1312 1313 output = &ListInstancesOutput{} 1314 req = c.newRequest(op, input, output) 1315 return 1316} 1317 1318// ListInstances API operation for AWS Cloud Map. 1319// 1320// Lists summary information about the instances that you registered by using 1321// a specified service. 1322// 1323// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1324// with awserr.Error's Code and Message methods to get detailed information about 1325// the error. 1326// 1327// See the AWS API reference guide for AWS Cloud Map's 1328// API operation ListInstances for usage and error information. 1329// 1330// Returned Error Codes: 1331// * ErrCodeServiceNotFound "ServiceNotFound" 1332// No service exists with the specified ID. 1333// 1334// * ErrCodeInvalidInput "InvalidInput" 1335// One or more specified values aren't valid. For example, a required value 1336// might be missing, a numeric value might be outside the allowed range, or 1337// a string value might exceed length constraints. 1338// 1339// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListInstances 1340func (c *ServiceDiscovery) ListInstances(input *ListInstancesInput) (*ListInstancesOutput, error) { 1341 req, out := c.ListInstancesRequest(input) 1342 return out, req.Send() 1343} 1344 1345// ListInstancesWithContext is the same as ListInstances with the addition of 1346// the ability to pass a context and additional request options. 1347// 1348// See ListInstances for details on how to use this API operation. 1349// 1350// The context must be non-nil and will be used for request cancellation. If 1351// the context is nil a panic will occur. In the future the SDK may create 1352// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1353// for more information on using Contexts. 1354func (c *ServiceDiscovery) ListInstancesWithContext(ctx aws.Context, input *ListInstancesInput, opts ...request.Option) (*ListInstancesOutput, error) { 1355 req, out := c.ListInstancesRequest(input) 1356 req.SetContext(ctx) 1357 req.ApplyOptions(opts...) 1358 return out, req.Send() 1359} 1360 1361// ListInstancesPages iterates over the pages of a ListInstances operation, 1362// calling the "fn" function with the response data for each page. To stop 1363// iterating, return false from the fn function. 1364// 1365// See ListInstances method for more information on how to use this operation. 1366// 1367// Note: This operation can generate multiple requests to a service. 1368// 1369// // Example iterating over at most 3 pages of a ListInstances operation. 1370// pageNum := 0 1371// err := client.ListInstancesPages(params, 1372// func(page *servicediscovery.ListInstancesOutput, lastPage bool) bool { 1373// pageNum++ 1374// fmt.Println(page) 1375// return pageNum <= 3 1376// }) 1377// 1378func (c *ServiceDiscovery) ListInstancesPages(input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool) error { 1379 return c.ListInstancesPagesWithContext(aws.BackgroundContext(), input, fn) 1380} 1381 1382// ListInstancesPagesWithContext same as ListInstancesPages except 1383// it takes a Context and allows setting request options on the pages. 1384// 1385// The context must be non-nil and will be used for request cancellation. If 1386// the context is nil a panic will occur. In the future the SDK may create 1387// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1388// for more information on using Contexts. 1389func (c *ServiceDiscovery) ListInstancesPagesWithContext(ctx aws.Context, input *ListInstancesInput, fn func(*ListInstancesOutput, bool) bool, opts ...request.Option) error { 1390 p := request.Pagination{ 1391 NewRequest: func() (*request.Request, error) { 1392 var inCpy *ListInstancesInput 1393 if input != nil { 1394 tmp := *input 1395 inCpy = &tmp 1396 } 1397 req, _ := c.ListInstancesRequest(inCpy) 1398 req.SetContext(ctx) 1399 req.ApplyOptions(opts...) 1400 return req, nil 1401 }, 1402 } 1403 1404 cont := true 1405 for p.Next() && cont { 1406 cont = fn(p.Page().(*ListInstancesOutput), !p.HasNextPage()) 1407 } 1408 return p.Err() 1409} 1410 1411const opListNamespaces = "ListNamespaces" 1412 1413// ListNamespacesRequest generates a "aws/request.Request" representing the 1414// client's request for the ListNamespaces operation. The "output" return 1415// value will be populated with the request's response once the request completes 1416// successfully. 1417// 1418// Use "Send" method on the returned Request to send the API call to the service. 1419// the "output" return value is not valid until after Send returns without error. 1420// 1421// See ListNamespaces for more information on using the ListNamespaces 1422// API call, and error handling. 1423// 1424// This method is useful when you want to inject custom logic or configuration 1425// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1426// 1427// 1428// // Example sending a request using the ListNamespacesRequest method. 1429// req, resp := client.ListNamespacesRequest(params) 1430// 1431// err := req.Send() 1432// if err == nil { // resp is now filled 1433// fmt.Println(resp) 1434// } 1435// 1436// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces 1437func (c *ServiceDiscovery) ListNamespacesRequest(input *ListNamespacesInput) (req *request.Request, output *ListNamespacesOutput) { 1438 op := &request.Operation{ 1439 Name: opListNamespaces, 1440 HTTPMethod: "POST", 1441 HTTPPath: "/", 1442 Paginator: &request.Paginator{ 1443 InputTokens: []string{"NextToken"}, 1444 OutputTokens: []string{"NextToken"}, 1445 LimitToken: "MaxResults", 1446 TruncationToken: "", 1447 }, 1448 } 1449 1450 if input == nil { 1451 input = &ListNamespacesInput{} 1452 } 1453 1454 output = &ListNamespacesOutput{} 1455 req = c.newRequest(op, input, output) 1456 return 1457} 1458 1459// ListNamespaces API operation for AWS Cloud Map. 1460// 1461// Lists summary information about the namespaces that were created by the current 1462// AWS account. 1463// 1464// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1465// with awserr.Error's Code and Message methods to get detailed information about 1466// the error. 1467// 1468// See the AWS API reference guide for AWS Cloud Map's 1469// API operation ListNamespaces for usage and error information. 1470// 1471// Returned Error Codes: 1472// * ErrCodeInvalidInput "InvalidInput" 1473// One or more specified values aren't valid. For example, a required value 1474// might be missing, a numeric value might be outside the allowed range, or 1475// a string value might exceed length constraints. 1476// 1477// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListNamespaces 1478func (c *ServiceDiscovery) ListNamespaces(input *ListNamespacesInput) (*ListNamespacesOutput, error) { 1479 req, out := c.ListNamespacesRequest(input) 1480 return out, req.Send() 1481} 1482 1483// ListNamespacesWithContext is the same as ListNamespaces with the addition of 1484// the ability to pass a context and additional request options. 1485// 1486// See ListNamespaces for details on how to use this API operation. 1487// 1488// The context must be non-nil and will be used for request cancellation. If 1489// the context is nil a panic will occur. In the future the SDK may create 1490// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1491// for more information on using Contexts. 1492func (c *ServiceDiscovery) ListNamespacesWithContext(ctx aws.Context, input *ListNamespacesInput, opts ...request.Option) (*ListNamespacesOutput, error) { 1493 req, out := c.ListNamespacesRequest(input) 1494 req.SetContext(ctx) 1495 req.ApplyOptions(opts...) 1496 return out, req.Send() 1497} 1498 1499// ListNamespacesPages iterates over the pages of a ListNamespaces operation, 1500// calling the "fn" function with the response data for each page. To stop 1501// iterating, return false from the fn function. 1502// 1503// See ListNamespaces method for more information on how to use this operation. 1504// 1505// Note: This operation can generate multiple requests to a service. 1506// 1507// // Example iterating over at most 3 pages of a ListNamespaces operation. 1508// pageNum := 0 1509// err := client.ListNamespacesPages(params, 1510// func(page *servicediscovery.ListNamespacesOutput, lastPage bool) bool { 1511// pageNum++ 1512// fmt.Println(page) 1513// return pageNum <= 3 1514// }) 1515// 1516func (c *ServiceDiscovery) ListNamespacesPages(input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool) error { 1517 return c.ListNamespacesPagesWithContext(aws.BackgroundContext(), input, fn) 1518} 1519 1520// ListNamespacesPagesWithContext same as ListNamespacesPages except 1521// it takes a Context and allows setting request options on the pages. 1522// 1523// The context must be non-nil and will be used for request cancellation. If 1524// the context is nil a panic will occur. In the future the SDK may create 1525// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1526// for more information on using Contexts. 1527func (c *ServiceDiscovery) ListNamespacesPagesWithContext(ctx aws.Context, input *ListNamespacesInput, fn func(*ListNamespacesOutput, bool) bool, opts ...request.Option) error { 1528 p := request.Pagination{ 1529 NewRequest: func() (*request.Request, error) { 1530 var inCpy *ListNamespacesInput 1531 if input != nil { 1532 tmp := *input 1533 inCpy = &tmp 1534 } 1535 req, _ := c.ListNamespacesRequest(inCpy) 1536 req.SetContext(ctx) 1537 req.ApplyOptions(opts...) 1538 return req, nil 1539 }, 1540 } 1541 1542 cont := true 1543 for p.Next() && cont { 1544 cont = fn(p.Page().(*ListNamespacesOutput), !p.HasNextPage()) 1545 } 1546 return p.Err() 1547} 1548 1549const opListOperations = "ListOperations" 1550 1551// ListOperationsRequest generates a "aws/request.Request" representing the 1552// client's request for the ListOperations operation. The "output" return 1553// value will be populated with the request's response once the request completes 1554// successfully. 1555// 1556// Use "Send" method on the returned Request to send the API call to the service. 1557// the "output" return value is not valid until after Send returns without error. 1558// 1559// See ListOperations for more information on using the ListOperations 1560// API call, and error handling. 1561// 1562// This method is useful when you want to inject custom logic or configuration 1563// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1564// 1565// 1566// // Example sending a request using the ListOperationsRequest method. 1567// req, resp := client.ListOperationsRequest(params) 1568// 1569// err := req.Send() 1570// if err == nil { // resp is now filled 1571// fmt.Println(resp) 1572// } 1573// 1574// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations 1575func (c *ServiceDiscovery) ListOperationsRequest(input *ListOperationsInput) (req *request.Request, output *ListOperationsOutput) { 1576 op := &request.Operation{ 1577 Name: opListOperations, 1578 HTTPMethod: "POST", 1579 HTTPPath: "/", 1580 Paginator: &request.Paginator{ 1581 InputTokens: []string{"NextToken"}, 1582 OutputTokens: []string{"NextToken"}, 1583 LimitToken: "MaxResults", 1584 TruncationToken: "", 1585 }, 1586 } 1587 1588 if input == nil { 1589 input = &ListOperationsInput{} 1590 } 1591 1592 output = &ListOperationsOutput{} 1593 req = c.newRequest(op, input, output) 1594 return 1595} 1596 1597// ListOperations API operation for AWS Cloud Map. 1598// 1599// Lists operations that match the criteria that you specify. 1600// 1601// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1602// with awserr.Error's Code and Message methods to get detailed information about 1603// the error. 1604// 1605// See the AWS API reference guide for AWS Cloud Map's 1606// API operation ListOperations for usage and error information. 1607// 1608// Returned Error Codes: 1609// * ErrCodeInvalidInput "InvalidInput" 1610// One or more specified values aren't valid. For example, a required value 1611// might be missing, a numeric value might be outside the allowed range, or 1612// a string value might exceed length constraints. 1613// 1614// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListOperations 1615func (c *ServiceDiscovery) ListOperations(input *ListOperationsInput) (*ListOperationsOutput, error) { 1616 req, out := c.ListOperationsRequest(input) 1617 return out, req.Send() 1618} 1619 1620// ListOperationsWithContext is the same as ListOperations with the addition of 1621// the ability to pass a context and additional request options. 1622// 1623// See ListOperations for details on how to use this API operation. 1624// 1625// The context must be non-nil and will be used for request cancellation. If 1626// the context is nil a panic will occur. In the future the SDK may create 1627// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1628// for more information on using Contexts. 1629func (c *ServiceDiscovery) ListOperationsWithContext(ctx aws.Context, input *ListOperationsInput, opts ...request.Option) (*ListOperationsOutput, error) { 1630 req, out := c.ListOperationsRequest(input) 1631 req.SetContext(ctx) 1632 req.ApplyOptions(opts...) 1633 return out, req.Send() 1634} 1635 1636// ListOperationsPages iterates over the pages of a ListOperations operation, 1637// calling the "fn" function with the response data for each page. To stop 1638// iterating, return false from the fn function. 1639// 1640// See ListOperations method for more information on how to use this operation. 1641// 1642// Note: This operation can generate multiple requests to a service. 1643// 1644// // Example iterating over at most 3 pages of a ListOperations operation. 1645// pageNum := 0 1646// err := client.ListOperationsPages(params, 1647// func(page *servicediscovery.ListOperationsOutput, lastPage bool) bool { 1648// pageNum++ 1649// fmt.Println(page) 1650// return pageNum <= 3 1651// }) 1652// 1653func (c *ServiceDiscovery) ListOperationsPages(input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool) error { 1654 return c.ListOperationsPagesWithContext(aws.BackgroundContext(), input, fn) 1655} 1656 1657// ListOperationsPagesWithContext same as ListOperationsPages except 1658// it takes a Context and allows setting request options on the pages. 1659// 1660// The context must be non-nil and will be used for request cancellation. If 1661// the context is nil a panic will occur. In the future the SDK may create 1662// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1663// for more information on using Contexts. 1664func (c *ServiceDiscovery) ListOperationsPagesWithContext(ctx aws.Context, input *ListOperationsInput, fn func(*ListOperationsOutput, bool) bool, opts ...request.Option) error { 1665 p := request.Pagination{ 1666 NewRequest: func() (*request.Request, error) { 1667 var inCpy *ListOperationsInput 1668 if input != nil { 1669 tmp := *input 1670 inCpy = &tmp 1671 } 1672 req, _ := c.ListOperationsRequest(inCpy) 1673 req.SetContext(ctx) 1674 req.ApplyOptions(opts...) 1675 return req, nil 1676 }, 1677 } 1678 1679 cont := true 1680 for p.Next() && cont { 1681 cont = fn(p.Page().(*ListOperationsOutput), !p.HasNextPage()) 1682 } 1683 return p.Err() 1684} 1685 1686const opListServices = "ListServices" 1687 1688// ListServicesRequest generates a "aws/request.Request" representing the 1689// client's request for the ListServices operation. The "output" return 1690// value will be populated with the request's response once the request completes 1691// successfully. 1692// 1693// Use "Send" method on the returned Request to send the API call to the service. 1694// the "output" return value is not valid until after Send returns without error. 1695// 1696// See ListServices for more information on using the ListServices 1697// API call, and error handling. 1698// 1699// This method is useful when you want to inject custom logic or configuration 1700// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1701// 1702// 1703// // Example sending a request using the ListServicesRequest method. 1704// req, resp := client.ListServicesRequest(params) 1705// 1706// err := req.Send() 1707// if err == nil { // resp is now filled 1708// fmt.Println(resp) 1709// } 1710// 1711// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices 1712func (c *ServiceDiscovery) ListServicesRequest(input *ListServicesInput) (req *request.Request, output *ListServicesOutput) { 1713 op := &request.Operation{ 1714 Name: opListServices, 1715 HTTPMethod: "POST", 1716 HTTPPath: "/", 1717 Paginator: &request.Paginator{ 1718 InputTokens: []string{"NextToken"}, 1719 OutputTokens: []string{"NextToken"}, 1720 LimitToken: "MaxResults", 1721 TruncationToken: "", 1722 }, 1723 } 1724 1725 if input == nil { 1726 input = &ListServicesInput{} 1727 } 1728 1729 output = &ListServicesOutput{} 1730 req = c.newRequest(op, input, output) 1731 return 1732} 1733 1734// ListServices API operation for AWS Cloud Map. 1735// 1736// Lists summary information for all the services that are associated with one 1737// or more specified namespaces. 1738// 1739// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1740// with awserr.Error's Code and Message methods to get detailed information about 1741// the error. 1742// 1743// See the AWS API reference guide for AWS Cloud Map's 1744// API operation ListServices for usage and error information. 1745// 1746// Returned Error Codes: 1747// * ErrCodeInvalidInput "InvalidInput" 1748// One or more specified values aren't valid. For example, a required value 1749// might be missing, a numeric value might be outside the allowed range, or 1750// a string value might exceed length constraints. 1751// 1752// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/ListServices 1753func (c *ServiceDiscovery) ListServices(input *ListServicesInput) (*ListServicesOutput, error) { 1754 req, out := c.ListServicesRequest(input) 1755 return out, req.Send() 1756} 1757 1758// ListServicesWithContext is the same as ListServices with the addition of 1759// the ability to pass a context and additional request options. 1760// 1761// See ListServices for details on how to use this API operation. 1762// 1763// The context must be non-nil and will be used for request cancellation. If 1764// the context is nil a panic will occur. In the future the SDK may create 1765// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1766// for more information on using Contexts. 1767func (c *ServiceDiscovery) ListServicesWithContext(ctx aws.Context, input *ListServicesInput, opts ...request.Option) (*ListServicesOutput, error) { 1768 req, out := c.ListServicesRequest(input) 1769 req.SetContext(ctx) 1770 req.ApplyOptions(opts...) 1771 return out, req.Send() 1772} 1773 1774// ListServicesPages iterates over the pages of a ListServices operation, 1775// calling the "fn" function with the response data for each page. To stop 1776// iterating, return false from the fn function. 1777// 1778// See ListServices method for more information on how to use this operation. 1779// 1780// Note: This operation can generate multiple requests to a service. 1781// 1782// // Example iterating over at most 3 pages of a ListServices operation. 1783// pageNum := 0 1784// err := client.ListServicesPages(params, 1785// func(page *servicediscovery.ListServicesOutput, lastPage bool) bool { 1786// pageNum++ 1787// fmt.Println(page) 1788// return pageNum <= 3 1789// }) 1790// 1791func (c *ServiceDiscovery) ListServicesPages(input *ListServicesInput, fn func(*ListServicesOutput, bool) bool) error { 1792 return c.ListServicesPagesWithContext(aws.BackgroundContext(), input, fn) 1793} 1794 1795// ListServicesPagesWithContext same as ListServicesPages except 1796// it takes a Context and allows setting request options on the pages. 1797// 1798// The context must be non-nil and will be used for request cancellation. If 1799// the context is nil a panic will occur. In the future the SDK may create 1800// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1801// for more information on using Contexts. 1802func (c *ServiceDiscovery) ListServicesPagesWithContext(ctx aws.Context, input *ListServicesInput, fn func(*ListServicesOutput, bool) bool, opts ...request.Option) error { 1803 p := request.Pagination{ 1804 NewRequest: func() (*request.Request, error) { 1805 var inCpy *ListServicesInput 1806 if input != nil { 1807 tmp := *input 1808 inCpy = &tmp 1809 } 1810 req, _ := c.ListServicesRequest(inCpy) 1811 req.SetContext(ctx) 1812 req.ApplyOptions(opts...) 1813 return req, nil 1814 }, 1815 } 1816 1817 cont := true 1818 for p.Next() && cont { 1819 cont = fn(p.Page().(*ListServicesOutput), !p.HasNextPage()) 1820 } 1821 return p.Err() 1822} 1823 1824const opRegisterInstance = "RegisterInstance" 1825 1826// RegisterInstanceRequest generates a "aws/request.Request" representing the 1827// client's request for the RegisterInstance operation. The "output" return 1828// value will be populated with the request's response once the request completes 1829// successfully. 1830// 1831// Use "Send" method on the returned Request to send the API call to the service. 1832// the "output" return value is not valid until after Send returns without error. 1833// 1834// See RegisterInstance for more information on using the RegisterInstance 1835// API call, and error handling. 1836// 1837// This method is useful when you want to inject custom logic or configuration 1838// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1839// 1840// 1841// // Example sending a request using the RegisterInstanceRequest method. 1842// req, resp := client.RegisterInstanceRequest(params) 1843// 1844// err := req.Send() 1845// if err == nil { // resp is now filled 1846// fmt.Println(resp) 1847// } 1848// 1849// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance 1850func (c *ServiceDiscovery) RegisterInstanceRequest(input *RegisterInstanceInput) (req *request.Request, output *RegisterInstanceOutput) { 1851 op := &request.Operation{ 1852 Name: opRegisterInstance, 1853 HTTPMethod: "POST", 1854 HTTPPath: "/", 1855 } 1856 1857 if input == nil { 1858 input = &RegisterInstanceInput{} 1859 } 1860 1861 output = &RegisterInstanceOutput{} 1862 req = c.newRequest(op, input, output) 1863 return 1864} 1865 1866// RegisterInstance API operation for AWS Cloud Map. 1867// 1868// Creates or updates one or more records and, optionally, creates a health 1869// check based on the settings in a specified service. When you submit a RegisterInstance 1870// request, the following occurs: 1871// 1872// * For each DNS record that you define in the service that is specified 1873// by ServiceId, a record is created or updated in the hosted zone that is 1874// associated with the corresponding namespace. 1875// 1876// * If the service includes HealthCheckConfig, a health check is created 1877// based on the settings in the health check configuration. 1878// 1879// * The health check, if any, is associated with each of the new or updated 1880// records. 1881// 1882// One RegisterInstance request must complete before you can submit another 1883// request and specify the same service ID and instance ID. 1884// 1885// For more information, see CreateService. 1886// 1887// When AWS Cloud Map receives a DNS query for the specified DNS name, it returns 1888// the applicable value: 1889// 1890// * If the health check is healthy: returns all the records 1891// 1892// * If the health check is unhealthy: returns the applicable value for the 1893// last healthy instance 1894// 1895// * If you didn't specify a health check configuration: returns all the 1896// records 1897// 1898// For the current limit on the number of instances that you can register using 1899// the same namespace and using the same service, see AWS Cloud Map Limits (http://docs.aws.amazon.com/cloud-map/latest/dg/cloud-map-limits.html) 1900// in the AWS Cloud Map Developer Guide. 1901// 1902// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1903// with awserr.Error's Code and Message methods to get detailed information about 1904// the error. 1905// 1906// See the AWS API reference guide for AWS Cloud Map's 1907// API operation RegisterInstance for usage and error information. 1908// 1909// Returned Error Codes: 1910// * ErrCodeDuplicateRequest "DuplicateRequest" 1911// The operation is already in progress. 1912// 1913// * ErrCodeInvalidInput "InvalidInput" 1914// One or more specified values aren't valid. For example, a required value 1915// might be missing, a numeric value might be outside the allowed range, or 1916// a string value might exceed length constraints. 1917// 1918// * ErrCodeResourceInUse "ResourceInUse" 1919// The specified resource can't be deleted because it contains other resources. 1920// For example, you can't delete a service that contains any instances. 1921// 1922// * ErrCodeResourceLimitExceeded "ResourceLimitExceeded" 1923// The resource can't be created because you've reached the limit on the number 1924// of resources. 1925// 1926// * ErrCodeServiceNotFound "ServiceNotFound" 1927// No service exists with the specified ID. 1928// 1929// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/RegisterInstance 1930func (c *ServiceDiscovery) RegisterInstance(input *RegisterInstanceInput) (*RegisterInstanceOutput, error) { 1931 req, out := c.RegisterInstanceRequest(input) 1932 return out, req.Send() 1933} 1934 1935// RegisterInstanceWithContext is the same as RegisterInstance with the addition of 1936// the ability to pass a context and additional request options. 1937// 1938// See RegisterInstance for details on how to use this API operation. 1939// 1940// The context must be non-nil and will be used for request cancellation. If 1941// the context is nil a panic will occur. In the future the SDK may create 1942// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1943// for more information on using Contexts. 1944func (c *ServiceDiscovery) RegisterInstanceWithContext(ctx aws.Context, input *RegisterInstanceInput, opts ...request.Option) (*RegisterInstanceOutput, error) { 1945 req, out := c.RegisterInstanceRequest(input) 1946 req.SetContext(ctx) 1947 req.ApplyOptions(opts...) 1948 return out, req.Send() 1949} 1950 1951const opUpdateInstanceCustomHealthStatus = "UpdateInstanceCustomHealthStatus" 1952 1953// UpdateInstanceCustomHealthStatusRequest generates a "aws/request.Request" representing the 1954// client's request for the UpdateInstanceCustomHealthStatus operation. The "output" return 1955// value will be populated with the request's response once the request completes 1956// successfully. 1957// 1958// Use "Send" method on the returned Request to send the API call to the service. 1959// the "output" return value is not valid until after Send returns without error. 1960// 1961// See UpdateInstanceCustomHealthStatus for more information on using the UpdateInstanceCustomHealthStatus 1962// API call, and error handling. 1963// 1964// This method is useful when you want to inject custom logic or configuration 1965// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1966// 1967// 1968// // Example sending a request using the UpdateInstanceCustomHealthStatusRequest method. 1969// req, resp := client.UpdateInstanceCustomHealthStatusRequest(params) 1970// 1971// err := req.Send() 1972// if err == nil { // resp is now filled 1973// fmt.Println(resp) 1974// } 1975// 1976// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus 1977func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusRequest(input *UpdateInstanceCustomHealthStatusInput) (req *request.Request, output *UpdateInstanceCustomHealthStatusOutput) { 1978 op := &request.Operation{ 1979 Name: opUpdateInstanceCustomHealthStatus, 1980 HTTPMethod: "POST", 1981 HTTPPath: "/", 1982 } 1983 1984 if input == nil { 1985 input = &UpdateInstanceCustomHealthStatusInput{} 1986 } 1987 1988 output = &UpdateInstanceCustomHealthStatusOutput{} 1989 req = c.newRequest(op, input, output) 1990 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1991 return 1992} 1993 1994// UpdateInstanceCustomHealthStatus API operation for AWS Cloud Map. 1995// 1996// Submits a request to change the health status of a custom health check to 1997// healthy or unhealthy. 1998// 1999// You can use UpdateInstanceCustomHealthStatus to change the status only for 2000// custom health checks, which you define using HealthCheckCustomConfig when 2001// you create a service. You can't use it to change the status for Route 53 2002// health checks, which you define using HealthCheckConfig. 2003// 2004// For more information, see HealthCheckCustomConfig. 2005// 2006// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2007// with awserr.Error's Code and Message methods to get detailed information about 2008// the error. 2009// 2010// See the AWS API reference guide for AWS Cloud Map's 2011// API operation UpdateInstanceCustomHealthStatus for usage and error information. 2012// 2013// Returned Error Codes: 2014// * ErrCodeInstanceNotFound "InstanceNotFound" 2015// No instance exists with the specified ID, or the instance was recently registered, 2016// and information about the instance hasn't propagated yet. 2017// 2018// * ErrCodeServiceNotFound "ServiceNotFound" 2019// No service exists with the specified ID. 2020// 2021// * ErrCodeCustomHealthNotFound "CustomHealthNotFound" 2022// The health check for the instance that is specified by ServiceId and InstanceId 2023// is not a custom health check. 2024// 2025// * ErrCodeInvalidInput "InvalidInput" 2026// One or more specified values aren't valid. For example, a required value 2027// might be missing, a numeric value might be outside the allowed range, or 2028// a string value might exceed length constraints. 2029// 2030// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateInstanceCustomHealthStatus 2031func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatus(input *UpdateInstanceCustomHealthStatusInput) (*UpdateInstanceCustomHealthStatusOutput, error) { 2032 req, out := c.UpdateInstanceCustomHealthStatusRequest(input) 2033 return out, req.Send() 2034} 2035 2036// UpdateInstanceCustomHealthStatusWithContext is the same as UpdateInstanceCustomHealthStatus with the addition of 2037// the ability to pass a context and additional request options. 2038// 2039// See UpdateInstanceCustomHealthStatus for details on how to use this API operation. 2040// 2041// The context must be non-nil and will be used for request cancellation. If 2042// the context is nil a panic will occur. In the future the SDK may create 2043// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2044// for more information on using Contexts. 2045func (c *ServiceDiscovery) UpdateInstanceCustomHealthStatusWithContext(ctx aws.Context, input *UpdateInstanceCustomHealthStatusInput, opts ...request.Option) (*UpdateInstanceCustomHealthStatusOutput, error) { 2046 req, out := c.UpdateInstanceCustomHealthStatusRequest(input) 2047 req.SetContext(ctx) 2048 req.ApplyOptions(opts...) 2049 return out, req.Send() 2050} 2051 2052const opUpdateService = "UpdateService" 2053 2054// UpdateServiceRequest generates a "aws/request.Request" representing the 2055// client's request for the UpdateService operation. The "output" return 2056// value will be populated with the request's response once the request completes 2057// successfully. 2058// 2059// Use "Send" method on the returned Request to send the API call to the service. 2060// the "output" return value is not valid until after Send returns without error. 2061// 2062// See UpdateService for more information on using the UpdateService 2063// API call, and error handling. 2064// 2065// This method is useful when you want to inject custom logic or configuration 2066// into the SDK's request lifecycle. Such as custom headers, or retry logic. 2067// 2068// 2069// // Example sending a request using the UpdateServiceRequest method. 2070// req, resp := client.UpdateServiceRequest(params) 2071// 2072// err := req.Send() 2073// if err == nil { // resp is now filled 2074// fmt.Println(resp) 2075// } 2076// 2077// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService 2078func (c *ServiceDiscovery) UpdateServiceRequest(input *UpdateServiceInput) (req *request.Request, output *UpdateServiceOutput) { 2079 op := &request.Operation{ 2080 Name: opUpdateService, 2081 HTTPMethod: "POST", 2082 HTTPPath: "/", 2083 } 2084 2085 if input == nil { 2086 input = &UpdateServiceInput{} 2087 } 2088 2089 output = &UpdateServiceOutput{} 2090 req = c.newRequest(op, input, output) 2091 return 2092} 2093 2094// UpdateService API operation for AWS Cloud Map. 2095// 2096// Submits a request to perform the following operations: 2097// 2098// * Add or delete DnsRecords configurations 2099// 2100// * Update the TTL setting for existing DnsRecords configurations 2101// 2102// * Add, update, or delete HealthCheckConfig for a specified service 2103// 2104// For public and private DNS namespaces, you must specify all DnsRecords configurations 2105// (and, optionally, HealthCheckConfig) that you want to appear in the updated 2106// service. Any current configurations that don't appear in an UpdateService 2107// request are deleted. 2108// 2109// When you update the TTL setting for a service, AWS Cloud Map also updates 2110// the corresponding settings in all the records and health checks that were 2111// created by using the specified service. 2112// 2113// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 2114// with awserr.Error's Code and Message methods to get detailed information about 2115// the error. 2116// 2117// See the AWS API reference guide for AWS Cloud Map's 2118// API operation UpdateService for usage and error information. 2119// 2120// Returned Error Codes: 2121// * ErrCodeDuplicateRequest "DuplicateRequest" 2122// The operation is already in progress. 2123// 2124// * ErrCodeInvalidInput "InvalidInput" 2125// One or more specified values aren't valid. For example, a required value 2126// might be missing, a numeric value might be outside the allowed range, or 2127// a string value might exceed length constraints. 2128// 2129// * ErrCodeServiceNotFound "ServiceNotFound" 2130// No service exists with the specified ID. 2131// 2132// See also, https://docs.aws.amazon.com/goto/WebAPI/servicediscovery-2017-03-14/UpdateService 2133func (c *ServiceDiscovery) UpdateService(input *UpdateServiceInput) (*UpdateServiceOutput, error) { 2134 req, out := c.UpdateServiceRequest(input) 2135 return out, req.Send() 2136} 2137 2138// UpdateServiceWithContext is the same as UpdateService with the addition of 2139// the ability to pass a context and additional request options. 2140// 2141// See UpdateService for details on how to use this API operation. 2142// 2143// The context must be non-nil and will be used for request cancellation. If 2144// the context is nil a panic will occur. In the future the SDK may create 2145// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2146// for more information on using Contexts. 2147func (c *ServiceDiscovery) UpdateServiceWithContext(ctx aws.Context, input *UpdateServiceInput, opts ...request.Option) (*UpdateServiceOutput, error) { 2148 req, out := c.UpdateServiceRequest(input) 2149 req.SetContext(ctx) 2150 req.ApplyOptions(opts...) 2151 return out, req.Send() 2152} 2153 2154type CreateHttpNamespaceInput struct { 2155 _ struct{} `type:"structure"` 2156 2157 // A unique string that identifies the request and that allows failed CreateHttpNamespace 2158 // requests to be retried without the risk of executing the operation twice. 2159 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2160 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2161 2162 // A description for the namespace. 2163 Description *string `type:"string"` 2164 2165 // The name that you want to assign to this namespace. 2166 // 2167 // Name is a required field 2168 Name *string `type:"string" required:"true"` 2169} 2170 2171// String returns the string representation 2172func (s CreateHttpNamespaceInput) String() string { 2173 return awsutil.Prettify(s) 2174} 2175 2176// GoString returns the string representation 2177func (s CreateHttpNamespaceInput) GoString() string { 2178 return s.String() 2179} 2180 2181// Validate inspects the fields of the type to determine if they are valid. 2182func (s *CreateHttpNamespaceInput) Validate() error { 2183 invalidParams := request.ErrInvalidParams{Context: "CreateHttpNamespaceInput"} 2184 if s.Name == nil { 2185 invalidParams.Add(request.NewErrParamRequired("Name")) 2186 } 2187 2188 if invalidParams.Len() > 0 { 2189 return invalidParams 2190 } 2191 return nil 2192} 2193 2194// SetCreatorRequestId sets the CreatorRequestId field's value. 2195func (s *CreateHttpNamespaceInput) SetCreatorRequestId(v string) *CreateHttpNamespaceInput { 2196 s.CreatorRequestId = &v 2197 return s 2198} 2199 2200// SetDescription sets the Description field's value. 2201func (s *CreateHttpNamespaceInput) SetDescription(v string) *CreateHttpNamespaceInput { 2202 s.Description = &v 2203 return s 2204} 2205 2206// SetName sets the Name field's value. 2207func (s *CreateHttpNamespaceInput) SetName(v string) *CreateHttpNamespaceInput { 2208 s.Name = &v 2209 return s 2210} 2211 2212type CreateHttpNamespaceOutput struct { 2213 _ struct{} `type:"structure"` 2214 2215 // A value that you can use to determine whether the request completed successfully. 2216 // To get the status of the operation, see GetOperation. 2217 OperationId *string `type:"string"` 2218} 2219 2220// String returns the string representation 2221func (s CreateHttpNamespaceOutput) String() string { 2222 return awsutil.Prettify(s) 2223} 2224 2225// GoString returns the string representation 2226func (s CreateHttpNamespaceOutput) GoString() string { 2227 return s.String() 2228} 2229 2230// SetOperationId sets the OperationId field's value. 2231func (s *CreateHttpNamespaceOutput) SetOperationId(v string) *CreateHttpNamespaceOutput { 2232 s.OperationId = &v 2233 return s 2234} 2235 2236type CreatePrivateDnsNamespaceInput struct { 2237 _ struct{} `type:"structure"` 2238 2239 // A unique string that identifies the request and that allows failed CreatePrivateDnsNamespace 2240 // requests to be retried without the risk of executing the operation twice. 2241 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2242 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2243 2244 // A description for the namespace. 2245 Description *string `type:"string"` 2246 2247 // The name that you want to assign to this namespace. When you create a private 2248 // DNS namespace, AWS Cloud Map automatically creates an Amazon Route 53 private 2249 // hosted zone that has the same name as the namespace. 2250 // 2251 // Name is a required field 2252 Name *string `type:"string" required:"true"` 2253 2254 // The ID of the Amazon VPC that you want to associate the namespace with. 2255 // 2256 // Vpc is a required field 2257 Vpc *string `type:"string" required:"true"` 2258} 2259 2260// String returns the string representation 2261func (s CreatePrivateDnsNamespaceInput) String() string { 2262 return awsutil.Prettify(s) 2263} 2264 2265// GoString returns the string representation 2266func (s CreatePrivateDnsNamespaceInput) GoString() string { 2267 return s.String() 2268} 2269 2270// Validate inspects the fields of the type to determine if they are valid. 2271func (s *CreatePrivateDnsNamespaceInput) Validate() error { 2272 invalidParams := request.ErrInvalidParams{Context: "CreatePrivateDnsNamespaceInput"} 2273 if s.Name == nil { 2274 invalidParams.Add(request.NewErrParamRequired("Name")) 2275 } 2276 if s.Vpc == nil { 2277 invalidParams.Add(request.NewErrParamRequired("Vpc")) 2278 } 2279 2280 if invalidParams.Len() > 0 { 2281 return invalidParams 2282 } 2283 return nil 2284} 2285 2286// SetCreatorRequestId sets the CreatorRequestId field's value. 2287func (s *CreatePrivateDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePrivateDnsNamespaceInput { 2288 s.CreatorRequestId = &v 2289 return s 2290} 2291 2292// SetDescription sets the Description field's value. 2293func (s *CreatePrivateDnsNamespaceInput) SetDescription(v string) *CreatePrivateDnsNamespaceInput { 2294 s.Description = &v 2295 return s 2296} 2297 2298// SetName sets the Name field's value. 2299func (s *CreatePrivateDnsNamespaceInput) SetName(v string) *CreatePrivateDnsNamespaceInput { 2300 s.Name = &v 2301 return s 2302} 2303 2304// SetVpc sets the Vpc field's value. 2305func (s *CreatePrivateDnsNamespaceInput) SetVpc(v string) *CreatePrivateDnsNamespaceInput { 2306 s.Vpc = &v 2307 return s 2308} 2309 2310type CreatePrivateDnsNamespaceOutput struct { 2311 _ struct{} `type:"structure"` 2312 2313 // A value that you can use to determine whether the request completed successfully. 2314 // To get the status of the operation, see GetOperation. 2315 OperationId *string `type:"string"` 2316} 2317 2318// String returns the string representation 2319func (s CreatePrivateDnsNamespaceOutput) String() string { 2320 return awsutil.Prettify(s) 2321} 2322 2323// GoString returns the string representation 2324func (s CreatePrivateDnsNamespaceOutput) GoString() string { 2325 return s.String() 2326} 2327 2328// SetOperationId sets the OperationId field's value. 2329func (s *CreatePrivateDnsNamespaceOutput) SetOperationId(v string) *CreatePrivateDnsNamespaceOutput { 2330 s.OperationId = &v 2331 return s 2332} 2333 2334type CreatePublicDnsNamespaceInput struct { 2335 _ struct{} `type:"structure"` 2336 2337 // A unique string that identifies the request and that allows failed CreatePublicDnsNamespace 2338 // requests to be retried without the risk of executing the operation twice. 2339 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2340 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2341 2342 // A description for the namespace. 2343 Description *string `type:"string"` 2344 2345 // The name that you want to assign to this namespace. 2346 // 2347 // Name is a required field 2348 Name *string `type:"string" required:"true"` 2349} 2350 2351// String returns the string representation 2352func (s CreatePublicDnsNamespaceInput) String() string { 2353 return awsutil.Prettify(s) 2354} 2355 2356// GoString returns the string representation 2357func (s CreatePublicDnsNamespaceInput) GoString() string { 2358 return s.String() 2359} 2360 2361// Validate inspects the fields of the type to determine if they are valid. 2362func (s *CreatePublicDnsNamespaceInput) Validate() error { 2363 invalidParams := request.ErrInvalidParams{Context: "CreatePublicDnsNamespaceInput"} 2364 if s.Name == nil { 2365 invalidParams.Add(request.NewErrParamRequired("Name")) 2366 } 2367 2368 if invalidParams.Len() > 0 { 2369 return invalidParams 2370 } 2371 return nil 2372} 2373 2374// SetCreatorRequestId sets the CreatorRequestId field's value. 2375func (s *CreatePublicDnsNamespaceInput) SetCreatorRequestId(v string) *CreatePublicDnsNamespaceInput { 2376 s.CreatorRequestId = &v 2377 return s 2378} 2379 2380// SetDescription sets the Description field's value. 2381func (s *CreatePublicDnsNamespaceInput) SetDescription(v string) *CreatePublicDnsNamespaceInput { 2382 s.Description = &v 2383 return s 2384} 2385 2386// SetName sets the Name field's value. 2387func (s *CreatePublicDnsNamespaceInput) SetName(v string) *CreatePublicDnsNamespaceInput { 2388 s.Name = &v 2389 return s 2390} 2391 2392type CreatePublicDnsNamespaceOutput struct { 2393 _ struct{} `type:"structure"` 2394 2395 // A value that you can use to determine whether the request completed successfully. 2396 // To get the status of the operation, see GetOperation. 2397 OperationId *string `type:"string"` 2398} 2399 2400// String returns the string representation 2401func (s CreatePublicDnsNamespaceOutput) String() string { 2402 return awsutil.Prettify(s) 2403} 2404 2405// GoString returns the string representation 2406func (s CreatePublicDnsNamespaceOutput) GoString() string { 2407 return s.String() 2408} 2409 2410// SetOperationId sets the OperationId field's value. 2411func (s *CreatePublicDnsNamespaceOutput) SetOperationId(v string) *CreatePublicDnsNamespaceOutput { 2412 s.OperationId = &v 2413 return s 2414} 2415 2416type CreateServiceInput struct { 2417 _ struct{} `type:"structure"` 2418 2419 // A unique string that identifies the request and that allows failed CreateService 2420 // requests to be retried without the risk of executing the operation twice. 2421 // CreatorRequestId can be any unique string, for example, a date/time stamp. 2422 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 2423 2424 // A description for the service. 2425 Description *string `type:"string"` 2426 2427 // A complex type that contains information about the Amazon Route 53 records 2428 // that you want AWS Cloud Map to create when you register an instance. 2429 DnsConfig *DnsConfig `type:"structure"` 2430 2431 // Public DNS namespaces only. A complex type that contains settings for an 2432 // optional Route 53 health check. If you specify settings for a health check, 2433 // AWS Cloud Map associates the health check with all the Route 53 DNS records 2434 // that you specify in DnsConfig. 2435 // 2436 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 2437 // or HealthCheckConfig but not both. 2438 // 2439 // For information about the charges for health checks, see AWS Cloud Map Pricing 2440 // (http://aws.amazon.com/cloud-map/pricing/). 2441 HealthCheckConfig *HealthCheckConfig `type:"structure"` 2442 2443 // A complex type that contains information about an optional custom health 2444 // check. 2445 // 2446 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 2447 // or HealthCheckConfig but not both. 2448 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 2449 2450 // The name that you want to assign to the service. 2451 // 2452 // Name is a required field 2453 Name *string `type:"string" required:"true"` 2454 2455 // The ID of the namespace that you want to use to create the service. 2456 NamespaceId *string `type:"string"` 2457} 2458 2459// String returns the string representation 2460func (s CreateServiceInput) String() string { 2461 return awsutil.Prettify(s) 2462} 2463 2464// GoString returns the string representation 2465func (s CreateServiceInput) GoString() string { 2466 return s.String() 2467} 2468 2469// Validate inspects the fields of the type to determine if they are valid. 2470func (s *CreateServiceInput) Validate() error { 2471 invalidParams := request.ErrInvalidParams{Context: "CreateServiceInput"} 2472 if s.Name == nil { 2473 invalidParams.Add(request.NewErrParamRequired("Name")) 2474 } 2475 if s.DnsConfig != nil { 2476 if err := s.DnsConfig.Validate(); err != nil { 2477 invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) 2478 } 2479 } 2480 if s.HealthCheckConfig != nil { 2481 if err := s.HealthCheckConfig.Validate(); err != nil { 2482 invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) 2483 } 2484 } 2485 if s.HealthCheckCustomConfig != nil { 2486 if err := s.HealthCheckCustomConfig.Validate(); err != nil { 2487 invalidParams.AddNested("HealthCheckCustomConfig", err.(request.ErrInvalidParams)) 2488 } 2489 } 2490 2491 if invalidParams.Len() > 0 { 2492 return invalidParams 2493 } 2494 return nil 2495} 2496 2497// SetCreatorRequestId sets the CreatorRequestId field's value. 2498func (s *CreateServiceInput) SetCreatorRequestId(v string) *CreateServiceInput { 2499 s.CreatorRequestId = &v 2500 return s 2501} 2502 2503// SetDescription sets the Description field's value. 2504func (s *CreateServiceInput) SetDescription(v string) *CreateServiceInput { 2505 s.Description = &v 2506 return s 2507} 2508 2509// SetDnsConfig sets the DnsConfig field's value. 2510func (s *CreateServiceInput) SetDnsConfig(v *DnsConfig) *CreateServiceInput { 2511 s.DnsConfig = v 2512 return s 2513} 2514 2515// SetHealthCheckConfig sets the HealthCheckConfig field's value. 2516func (s *CreateServiceInput) SetHealthCheckConfig(v *HealthCheckConfig) *CreateServiceInput { 2517 s.HealthCheckConfig = v 2518 return s 2519} 2520 2521// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 2522func (s *CreateServiceInput) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *CreateServiceInput { 2523 s.HealthCheckCustomConfig = v 2524 return s 2525} 2526 2527// SetName sets the Name field's value. 2528func (s *CreateServiceInput) SetName(v string) *CreateServiceInput { 2529 s.Name = &v 2530 return s 2531} 2532 2533// SetNamespaceId sets the NamespaceId field's value. 2534func (s *CreateServiceInput) SetNamespaceId(v string) *CreateServiceInput { 2535 s.NamespaceId = &v 2536 return s 2537} 2538 2539type CreateServiceOutput struct { 2540 _ struct{} `type:"structure"` 2541 2542 // A complex type that contains information about the new service. 2543 Service *Service `type:"structure"` 2544} 2545 2546// String returns the string representation 2547func (s CreateServiceOutput) String() string { 2548 return awsutil.Prettify(s) 2549} 2550 2551// GoString returns the string representation 2552func (s CreateServiceOutput) GoString() string { 2553 return s.String() 2554} 2555 2556// SetService sets the Service field's value. 2557func (s *CreateServiceOutput) SetService(v *Service) *CreateServiceOutput { 2558 s.Service = v 2559 return s 2560} 2561 2562type DeleteNamespaceInput struct { 2563 _ struct{} `type:"structure"` 2564 2565 // The ID of the namespace that you want to delete. 2566 // 2567 // Id is a required field 2568 Id *string `type:"string" required:"true"` 2569} 2570 2571// String returns the string representation 2572func (s DeleteNamespaceInput) String() string { 2573 return awsutil.Prettify(s) 2574} 2575 2576// GoString returns the string representation 2577func (s DeleteNamespaceInput) GoString() string { 2578 return s.String() 2579} 2580 2581// Validate inspects the fields of the type to determine if they are valid. 2582func (s *DeleteNamespaceInput) Validate() error { 2583 invalidParams := request.ErrInvalidParams{Context: "DeleteNamespaceInput"} 2584 if s.Id == nil { 2585 invalidParams.Add(request.NewErrParamRequired("Id")) 2586 } 2587 2588 if invalidParams.Len() > 0 { 2589 return invalidParams 2590 } 2591 return nil 2592} 2593 2594// SetId sets the Id field's value. 2595func (s *DeleteNamespaceInput) SetId(v string) *DeleteNamespaceInput { 2596 s.Id = &v 2597 return s 2598} 2599 2600type DeleteNamespaceOutput struct { 2601 _ struct{} `type:"structure"` 2602 2603 // A value that you can use to determine whether the request completed successfully. 2604 // To get the status of the operation, see GetOperation. 2605 OperationId *string `type:"string"` 2606} 2607 2608// String returns the string representation 2609func (s DeleteNamespaceOutput) String() string { 2610 return awsutil.Prettify(s) 2611} 2612 2613// GoString returns the string representation 2614func (s DeleteNamespaceOutput) GoString() string { 2615 return s.String() 2616} 2617 2618// SetOperationId sets the OperationId field's value. 2619func (s *DeleteNamespaceOutput) SetOperationId(v string) *DeleteNamespaceOutput { 2620 s.OperationId = &v 2621 return s 2622} 2623 2624type DeleteServiceInput struct { 2625 _ struct{} `type:"structure"` 2626 2627 // The ID of the service that you want to delete. 2628 // 2629 // Id is a required field 2630 Id *string `type:"string" required:"true"` 2631} 2632 2633// String returns the string representation 2634func (s DeleteServiceInput) String() string { 2635 return awsutil.Prettify(s) 2636} 2637 2638// GoString returns the string representation 2639func (s DeleteServiceInput) GoString() string { 2640 return s.String() 2641} 2642 2643// Validate inspects the fields of the type to determine if they are valid. 2644func (s *DeleteServiceInput) Validate() error { 2645 invalidParams := request.ErrInvalidParams{Context: "DeleteServiceInput"} 2646 if s.Id == nil { 2647 invalidParams.Add(request.NewErrParamRequired("Id")) 2648 } 2649 2650 if invalidParams.Len() > 0 { 2651 return invalidParams 2652 } 2653 return nil 2654} 2655 2656// SetId sets the Id field's value. 2657func (s *DeleteServiceInput) SetId(v string) *DeleteServiceInput { 2658 s.Id = &v 2659 return s 2660} 2661 2662type DeleteServiceOutput struct { 2663 _ struct{} `type:"structure"` 2664} 2665 2666// String returns the string representation 2667func (s DeleteServiceOutput) String() string { 2668 return awsutil.Prettify(s) 2669} 2670 2671// GoString returns the string representation 2672func (s DeleteServiceOutput) GoString() string { 2673 return s.String() 2674} 2675 2676type DeregisterInstanceInput struct { 2677 _ struct{} `type:"structure"` 2678 2679 // The value that you specified for Id in the RegisterInstance request. 2680 // 2681 // InstanceId is a required field 2682 InstanceId *string `type:"string" required:"true"` 2683 2684 // The ID of the service that the instance is associated with. 2685 // 2686 // ServiceId is a required field 2687 ServiceId *string `type:"string" required:"true"` 2688} 2689 2690// String returns the string representation 2691func (s DeregisterInstanceInput) String() string { 2692 return awsutil.Prettify(s) 2693} 2694 2695// GoString returns the string representation 2696func (s DeregisterInstanceInput) GoString() string { 2697 return s.String() 2698} 2699 2700// Validate inspects the fields of the type to determine if they are valid. 2701func (s *DeregisterInstanceInput) Validate() error { 2702 invalidParams := request.ErrInvalidParams{Context: "DeregisterInstanceInput"} 2703 if s.InstanceId == nil { 2704 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 2705 } 2706 if s.ServiceId == nil { 2707 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 2708 } 2709 2710 if invalidParams.Len() > 0 { 2711 return invalidParams 2712 } 2713 return nil 2714} 2715 2716// SetInstanceId sets the InstanceId field's value. 2717func (s *DeregisterInstanceInput) SetInstanceId(v string) *DeregisterInstanceInput { 2718 s.InstanceId = &v 2719 return s 2720} 2721 2722// SetServiceId sets the ServiceId field's value. 2723func (s *DeregisterInstanceInput) SetServiceId(v string) *DeregisterInstanceInput { 2724 s.ServiceId = &v 2725 return s 2726} 2727 2728type DeregisterInstanceOutput struct { 2729 _ struct{} `type:"structure"` 2730 2731 // A value that you can use to determine whether the request completed successfully. 2732 // For more information, see GetOperation. 2733 OperationId *string `type:"string"` 2734} 2735 2736// String returns the string representation 2737func (s DeregisterInstanceOutput) String() string { 2738 return awsutil.Prettify(s) 2739} 2740 2741// GoString returns the string representation 2742func (s DeregisterInstanceOutput) GoString() string { 2743 return s.String() 2744} 2745 2746// SetOperationId sets the OperationId field's value. 2747func (s *DeregisterInstanceOutput) SetOperationId(v string) *DeregisterInstanceOutput { 2748 s.OperationId = &v 2749 return s 2750} 2751 2752type DiscoverInstancesInput struct { 2753 _ struct{} `type:"structure"` 2754 2755 // The health status of the instances that you want to discover. 2756 HealthStatus *string `type:"string" enum:"HealthStatusFilter"` 2757 2758 // The maximum number of instances that you want Cloud Map to return in the 2759 // response to a DiscoverInstances request. If you don't specify a value for 2760 // MaxResults, Cloud Map returns up to 100 instances. 2761 MaxResults *int64 `min:"1" type:"integer"` 2762 2763 // The name of the namespace that you specified when you registered the instance. 2764 // 2765 // NamespaceName is a required field 2766 NamespaceName *string `type:"string" required:"true"` 2767 2768 // A string map that contains attributes with values that you can use to filter 2769 // instances by any custom attribute that you specified when you registered 2770 // the instance. Only instances that match all the specified key/value pairs 2771 // will be returned. 2772 QueryParameters map[string]*string `type:"map"` 2773 2774 // The name of the service that you specified when you registered the instance. 2775 // 2776 // ServiceName is a required field 2777 ServiceName *string `type:"string" required:"true"` 2778} 2779 2780// String returns the string representation 2781func (s DiscoverInstancesInput) String() string { 2782 return awsutil.Prettify(s) 2783} 2784 2785// GoString returns the string representation 2786func (s DiscoverInstancesInput) GoString() string { 2787 return s.String() 2788} 2789 2790// Validate inspects the fields of the type to determine if they are valid. 2791func (s *DiscoverInstancesInput) Validate() error { 2792 invalidParams := request.ErrInvalidParams{Context: "DiscoverInstancesInput"} 2793 if s.MaxResults != nil && *s.MaxResults < 1 { 2794 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2795 } 2796 if s.NamespaceName == nil { 2797 invalidParams.Add(request.NewErrParamRequired("NamespaceName")) 2798 } 2799 if s.ServiceName == nil { 2800 invalidParams.Add(request.NewErrParamRequired("ServiceName")) 2801 } 2802 2803 if invalidParams.Len() > 0 { 2804 return invalidParams 2805 } 2806 return nil 2807} 2808 2809// SetHealthStatus sets the HealthStatus field's value. 2810func (s *DiscoverInstancesInput) SetHealthStatus(v string) *DiscoverInstancesInput { 2811 s.HealthStatus = &v 2812 return s 2813} 2814 2815// SetMaxResults sets the MaxResults field's value. 2816func (s *DiscoverInstancesInput) SetMaxResults(v int64) *DiscoverInstancesInput { 2817 s.MaxResults = &v 2818 return s 2819} 2820 2821// SetNamespaceName sets the NamespaceName field's value. 2822func (s *DiscoverInstancesInput) SetNamespaceName(v string) *DiscoverInstancesInput { 2823 s.NamespaceName = &v 2824 return s 2825} 2826 2827// SetQueryParameters sets the QueryParameters field's value. 2828func (s *DiscoverInstancesInput) SetQueryParameters(v map[string]*string) *DiscoverInstancesInput { 2829 s.QueryParameters = v 2830 return s 2831} 2832 2833// SetServiceName sets the ServiceName field's value. 2834func (s *DiscoverInstancesInput) SetServiceName(v string) *DiscoverInstancesInput { 2835 s.ServiceName = &v 2836 return s 2837} 2838 2839type DiscoverInstancesOutput struct { 2840 _ struct{} `type:"structure"` 2841 2842 // A complex type that contains one HttpInstanceSummary for each registered 2843 // instance. 2844 Instances []*HttpInstanceSummary `type:"list"` 2845} 2846 2847// String returns the string representation 2848func (s DiscoverInstancesOutput) String() string { 2849 return awsutil.Prettify(s) 2850} 2851 2852// GoString returns the string representation 2853func (s DiscoverInstancesOutput) GoString() string { 2854 return s.String() 2855} 2856 2857// SetInstances sets the Instances field's value. 2858func (s *DiscoverInstancesOutput) SetInstances(v []*HttpInstanceSummary) *DiscoverInstancesOutput { 2859 s.Instances = v 2860 return s 2861} 2862 2863// A complex type that contains information about the Amazon Route 53 DNS records 2864// that you want AWS Cloud Map to create when you register an instance. 2865type DnsConfig struct { 2866 _ struct{} `type:"structure"` 2867 2868 // An array that contains one DnsRecord object for each Route 53 DNS record 2869 // that you want AWS Cloud Map to create when you register an instance. 2870 // 2871 // DnsRecords is a required field 2872 DnsRecords []*DnsRecord `type:"list" required:"true"` 2873 2874 // The ID of the namespace to use for DNS configuration. 2875 // 2876 // Deprecated: Top level attribute in request should be used to reference namespace-id 2877 NamespaceId *string `deprecated:"true" type:"string"` 2878 2879 // The routing policy that you want to apply to all Route 53 DNS records that 2880 // AWS Cloud Map creates when you register an instance and specify this service. 2881 // 2882 // If you want to use this service to register instances that create alias records, 2883 // specify WEIGHTED for the routing policy. 2884 // 2885 // You can specify the following values: 2886 // 2887 // MULTIVALUE 2888 // 2889 // If you define a health check for the service and the health check is healthy, 2890 // Route 53 returns the applicable value for up to eight instances. 2891 // 2892 // For example, suppose the service includes configurations for one A record 2893 // and a health check, and you use the service to register 10 instances. Route 2894 // 53 responds to DNS queries with IP addresses for up to eight healthy instances. 2895 // If fewer than eight instances are healthy, Route 53 responds to every DNS 2896 // query with the IP addresses for all of the healthy instances. 2897 // 2898 // If you don't define a health check for the service, Route 53 assumes that 2899 // all instances are healthy and returns the values for up to eight instances. 2900 // 2901 // For more information about the multivalue routing policy, see Multivalue 2902 // Answer Routing (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-multivalue) 2903 // in the Route 53 Developer Guide. 2904 // 2905 // WEIGHTED 2906 // 2907 // Route 53 returns the applicable value from one randomly selected instance 2908 // from among the instances that you registered using the same service. Currently, 2909 // all records have the same weight, so you can't route more or less traffic 2910 // to any instances. 2911 // 2912 // For example, suppose the service includes configurations for one A record 2913 // and a health check, and you use the service to register 10 instances. Route 2914 // 53 responds to DNS queries with the IP address for one randomly selected 2915 // instance from among the healthy instances. If no instances are healthy, Route 2916 // 53 responds to DNS queries as if all of the instances were healthy. 2917 // 2918 // If you don't define a health check for the service, Route 53 assumes that 2919 // all instances are healthy and returns the applicable value for one randomly 2920 // selected instance. 2921 // 2922 // For more information about the weighted routing policy, see Weighted Routing 2923 // (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html#routing-policy-weighted) 2924 // in the Route 53 Developer Guide. 2925 RoutingPolicy *string `type:"string" enum:"RoutingPolicy"` 2926} 2927 2928// String returns the string representation 2929func (s DnsConfig) String() string { 2930 return awsutil.Prettify(s) 2931} 2932 2933// GoString returns the string representation 2934func (s DnsConfig) GoString() string { 2935 return s.String() 2936} 2937 2938// Validate inspects the fields of the type to determine if they are valid. 2939func (s *DnsConfig) Validate() error { 2940 invalidParams := request.ErrInvalidParams{Context: "DnsConfig"} 2941 if s.DnsRecords == nil { 2942 invalidParams.Add(request.NewErrParamRequired("DnsRecords")) 2943 } 2944 if s.DnsRecords != nil { 2945 for i, v := range s.DnsRecords { 2946 if v == nil { 2947 continue 2948 } 2949 if err := v.Validate(); err != nil { 2950 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) 2951 } 2952 } 2953 } 2954 2955 if invalidParams.Len() > 0 { 2956 return invalidParams 2957 } 2958 return nil 2959} 2960 2961// SetDnsRecords sets the DnsRecords field's value. 2962func (s *DnsConfig) SetDnsRecords(v []*DnsRecord) *DnsConfig { 2963 s.DnsRecords = v 2964 return s 2965} 2966 2967// SetNamespaceId sets the NamespaceId field's value. 2968func (s *DnsConfig) SetNamespaceId(v string) *DnsConfig { 2969 s.NamespaceId = &v 2970 return s 2971} 2972 2973// SetRoutingPolicy sets the RoutingPolicy field's value. 2974func (s *DnsConfig) SetRoutingPolicy(v string) *DnsConfig { 2975 s.RoutingPolicy = &v 2976 return s 2977} 2978 2979// A complex type that contains information about changes to the Route 53 DNS 2980// records that AWS Cloud Map creates when you register an instance. 2981type DnsConfigChange struct { 2982 _ struct{} `type:"structure"` 2983 2984 // An array that contains one DnsRecord object for each Route 53 record that 2985 // you want AWS Cloud Map to create when you register an instance. 2986 // 2987 // DnsRecords is a required field 2988 DnsRecords []*DnsRecord `type:"list" required:"true"` 2989} 2990 2991// String returns the string representation 2992func (s DnsConfigChange) String() string { 2993 return awsutil.Prettify(s) 2994} 2995 2996// GoString returns the string representation 2997func (s DnsConfigChange) GoString() string { 2998 return s.String() 2999} 3000 3001// Validate inspects the fields of the type to determine if they are valid. 3002func (s *DnsConfigChange) Validate() error { 3003 invalidParams := request.ErrInvalidParams{Context: "DnsConfigChange"} 3004 if s.DnsRecords == nil { 3005 invalidParams.Add(request.NewErrParamRequired("DnsRecords")) 3006 } 3007 if s.DnsRecords != nil { 3008 for i, v := range s.DnsRecords { 3009 if v == nil { 3010 continue 3011 } 3012 if err := v.Validate(); err != nil { 3013 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DnsRecords", i), err.(request.ErrInvalidParams)) 3014 } 3015 } 3016 } 3017 3018 if invalidParams.Len() > 0 { 3019 return invalidParams 3020 } 3021 return nil 3022} 3023 3024// SetDnsRecords sets the DnsRecords field's value. 3025func (s *DnsConfigChange) SetDnsRecords(v []*DnsRecord) *DnsConfigChange { 3026 s.DnsRecords = v 3027 return s 3028} 3029 3030// A complex type that contains the ID for the Route 53 hosted zone that AWS 3031// Cloud Map creates when you create a namespace. 3032type DnsProperties struct { 3033 _ struct{} `type:"structure"` 3034 3035 // The ID for the Route 53 hosted zone that AWS Cloud Map creates when you create 3036 // a namespace. 3037 HostedZoneId *string `type:"string"` 3038} 3039 3040// String returns the string representation 3041func (s DnsProperties) String() string { 3042 return awsutil.Prettify(s) 3043} 3044 3045// GoString returns the string representation 3046func (s DnsProperties) GoString() string { 3047 return s.String() 3048} 3049 3050// SetHostedZoneId sets the HostedZoneId field's value. 3051func (s *DnsProperties) SetHostedZoneId(v string) *DnsProperties { 3052 s.HostedZoneId = &v 3053 return s 3054} 3055 3056// A complex type that contains information about the Route 53 DNS records that 3057// you want AWS Cloud Map to create when you register an instance. 3058type DnsRecord struct { 3059 _ struct{} `type:"structure"` 3060 3061 // The amount of time, in seconds, that you want DNS resolvers to cache the 3062 // settings for this record. 3063 // 3064 // Alias records don't include a TTL because Route 53 uses the TTL for the AWS 3065 // resource that an alias record routes traffic to. If you include the AWS_ALIAS_DNS_NAME 3066 // attribute when you submit a RegisterInstance request, the TTL value is ignored. 3067 // Always specify a TTL for the service; you can use a service to register instances 3068 // that create either alias or non-alias records. 3069 // 3070 // TTL is a required field 3071 TTL *int64 `type:"long" required:"true"` 3072 3073 // The type of the resource, which indicates the type of value that Route 53 3074 // returns in response to DNS queries. 3075 // 3076 // Note the following: 3077 // 3078 // * A, AAAA, and SRV records: You can specify settings for a maximum of 3079 // one A, one AAAA, and one SRV record. You can specify them in any combination. 3080 // 3081 // * CNAME records: If you specify CNAME for Type, you can't define any other 3082 // records. This is a limitation of DNS: you can't create a CNAME record 3083 // and any other type of record that has the same name as a CNAME record. 3084 // 3085 // * Alias records: If you want AWS Cloud Map to create a Route 53 alias 3086 // record when you register an instance, specify A or AAAA for Type. 3087 // 3088 // * All records: You specify settings other than TTL and Type when you register 3089 // an instance. 3090 // 3091 // The following values are supported: 3092 // 3093 // A 3094 // 3095 // Route 53 returns the IP address of the resource in IPv4 format, such as 192.0.2.44. 3096 // 3097 // AAAA 3098 // 3099 // Route 53 returns the IP address of the resource in IPv6 format, such as 2001:0db8:85a3:0000:0000:abcd:0001:2345. 3100 // 3101 // CNAME 3102 // 3103 // Route 53 returns the domain name of the resource, such as www.example.com. 3104 // Note the following: 3105 // 3106 // * You specify the domain name that you want to route traffic to when you 3107 // register an instance. For more information, see RegisterInstanceRequest$Attributes. 3108 // 3109 // * You must specify WEIGHTED for the value of RoutingPolicy. 3110 // 3111 // * You can't specify both CNAME for Type and settings for HealthCheckConfig. 3112 // If you do, the request will fail with an InvalidInput error. 3113 // 3114 // SRV 3115 // 3116 // Route 53 returns the value for an SRV record. The value for an SRV record 3117 // uses the following values: 3118 // 3119 // priority weight port service-hostname 3120 // 3121 // Note the following about the values: 3122 // 3123 // * The values of priority and weight are both set to 1 and can't be changed. 3124 // 3125 // * The value of port comes from the value that you specify for the AWS_INSTANCE_PORT 3126 // attribute when you submit a RegisterInstance request. 3127 // 3128 // * The value of service-hostname is a concatenation of the following values: 3129 // The value that you specify for InstanceId when you register an instance. 3130 // The name of the service. The name of the namespace. For example, if the 3131 // value of InstanceId is test, the name of the service is backend, and the 3132 // name of the namespace is example.com, the value of service-hostname is: 3133 // test.backend.example.com 3134 // 3135 // If you specify settings for an SRV record and if you specify values for AWS_INSTANCE_IPV4, 3136 // AWS_INSTANCE_IPV6, or both in the RegisterInstance request, AWS Cloud Map 3137 // automatically creates A and/or AAAA records that have the same name as the 3138 // value of service-hostname in the SRV record. You can ignore these records. 3139 // 3140 // Type is a required field 3141 Type *string `type:"string" required:"true" enum:"RecordType"` 3142} 3143 3144// String returns the string representation 3145func (s DnsRecord) String() string { 3146 return awsutil.Prettify(s) 3147} 3148 3149// GoString returns the string representation 3150func (s DnsRecord) GoString() string { 3151 return s.String() 3152} 3153 3154// Validate inspects the fields of the type to determine if they are valid. 3155func (s *DnsRecord) Validate() error { 3156 invalidParams := request.ErrInvalidParams{Context: "DnsRecord"} 3157 if s.TTL == nil { 3158 invalidParams.Add(request.NewErrParamRequired("TTL")) 3159 } 3160 if s.Type == nil { 3161 invalidParams.Add(request.NewErrParamRequired("Type")) 3162 } 3163 3164 if invalidParams.Len() > 0 { 3165 return invalidParams 3166 } 3167 return nil 3168} 3169 3170// SetTTL sets the TTL field's value. 3171func (s *DnsRecord) SetTTL(v int64) *DnsRecord { 3172 s.TTL = &v 3173 return s 3174} 3175 3176// SetType sets the Type field's value. 3177func (s *DnsRecord) SetType(v string) *DnsRecord { 3178 s.Type = &v 3179 return s 3180} 3181 3182type GetInstanceInput struct { 3183 _ struct{} `type:"structure"` 3184 3185 // The ID of the instance that you want to get information about. 3186 // 3187 // InstanceId is a required field 3188 InstanceId *string `type:"string" required:"true"` 3189 3190 // The ID of the service that the instance is associated with. 3191 // 3192 // ServiceId is a required field 3193 ServiceId *string `type:"string" required:"true"` 3194} 3195 3196// String returns the string representation 3197func (s GetInstanceInput) String() string { 3198 return awsutil.Prettify(s) 3199} 3200 3201// GoString returns the string representation 3202func (s GetInstanceInput) GoString() string { 3203 return s.String() 3204} 3205 3206// Validate inspects the fields of the type to determine if they are valid. 3207func (s *GetInstanceInput) Validate() error { 3208 invalidParams := request.ErrInvalidParams{Context: "GetInstanceInput"} 3209 if s.InstanceId == nil { 3210 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 3211 } 3212 if s.ServiceId == nil { 3213 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 3214 } 3215 3216 if invalidParams.Len() > 0 { 3217 return invalidParams 3218 } 3219 return nil 3220} 3221 3222// SetInstanceId sets the InstanceId field's value. 3223func (s *GetInstanceInput) SetInstanceId(v string) *GetInstanceInput { 3224 s.InstanceId = &v 3225 return s 3226} 3227 3228// SetServiceId sets the ServiceId field's value. 3229func (s *GetInstanceInput) SetServiceId(v string) *GetInstanceInput { 3230 s.ServiceId = &v 3231 return s 3232} 3233 3234type GetInstanceOutput struct { 3235 _ struct{} `type:"structure"` 3236 3237 // A complex type that contains information about a specified instance. 3238 Instance *Instance `type:"structure"` 3239} 3240 3241// String returns the string representation 3242func (s GetInstanceOutput) String() string { 3243 return awsutil.Prettify(s) 3244} 3245 3246// GoString returns the string representation 3247func (s GetInstanceOutput) GoString() string { 3248 return s.String() 3249} 3250 3251// SetInstance sets the Instance field's value. 3252func (s *GetInstanceOutput) SetInstance(v *Instance) *GetInstanceOutput { 3253 s.Instance = v 3254 return s 3255} 3256 3257type GetInstancesHealthStatusInput struct { 3258 _ struct{} `type:"structure"` 3259 3260 // An array that contains the IDs of all the instances that you want to get 3261 // the health status for. 3262 // 3263 // If you omit Instances, AWS Cloud Map returns the health status for all the 3264 // instances that are associated with the specified service. 3265 // 3266 // To get the IDs for the instances that you've registered by using a specified 3267 // service, submit a ListInstances request. 3268 Instances []*string `min:"1" type:"list"` 3269 3270 // The maximum number of instances that you want AWS Cloud Map to return in 3271 // the response to a GetInstancesHealthStatus request. If you don't specify 3272 // a value for MaxResults, AWS Cloud Map returns up to 100 instances. 3273 MaxResults *int64 `min:"1" type:"integer"` 3274 3275 // For the first GetInstancesHealthStatus request, omit this value. 3276 // 3277 // If more than MaxResults instances match the specified criteria, you can submit 3278 // another GetInstancesHealthStatus request to get the next group of results. 3279 // Specify the value of NextToken from the previous response in the next request. 3280 NextToken *string `type:"string"` 3281 3282 // The ID of the service that the instance is associated with. 3283 // 3284 // ServiceId is a required field 3285 ServiceId *string `type:"string" required:"true"` 3286} 3287 3288// String returns the string representation 3289func (s GetInstancesHealthStatusInput) String() string { 3290 return awsutil.Prettify(s) 3291} 3292 3293// GoString returns the string representation 3294func (s GetInstancesHealthStatusInput) GoString() string { 3295 return s.String() 3296} 3297 3298// Validate inspects the fields of the type to determine if they are valid. 3299func (s *GetInstancesHealthStatusInput) Validate() error { 3300 invalidParams := request.ErrInvalidParams{Context: "GetInstancesHealthStatusInput"} 3301 if s.Instances != nil && len(s.Instances) < 1 { 3302 invalidParams.Add(request.NewErrParamMinLen("Instances", 1)) 3303 } 3304 if s.MaxResults != nil && *s.MaxResults < 1 { 3305 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3306 } 3307 if s.ServiceId == nil { 3308 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 3309 } 3310 3311 if invalidParams.Len() > 0 { 3312 return invalidParams 3313 } 3314 return nil 3315} 3316 3317// SetInstances sets the Instances field's value. 3318func (s *GetInstancesHealthStatusInput) SetInstances(v []*string) *GetInstancesHealthStatusInput { 3319 s.Instances = v 3320 return s 3321} 3322 3323// SetMaxResults sets the MaxResults field's value. 3324func (s *GetInstancesHealthStatusInput) SetMaxResults(v int64) *GetInstancesHealthStatusInput { 3325 s.MaxResults = &v 3326 return s 3327} 3328 3329// SetNextToken sets the NextToken field's value. 3330func (s *GetInstancesHealthStatusInput) SetNextToken(v string) *GetInstancesHealthStatusInput { 3331 s.NextToken = &v 3332 return s 3333} 3334 3335// SetServiceId sets the ServiceId field's value. 3336func (s *GetInstancesHealthStatusInput) SetServiceId(v string) *GetInstancesHealthStatusInput { 3337 s.ServiceId = &v 3338 return s 3339} 3340 3341type GetInstancesHealthStatusOutput struct { 3342 _ struct{} `type:"structure"` 3343 3344 // If more than MaxResults instances match the specified criteria, you can submit 3345 // another GetInstancesHealthStatus request to get the next group of results. 3346 // Specify the value of NextToken from the previous response in the next request. 3347 NextToken *string `type:"string"` 3348 3349 // A complex type that contains the IDs and the health status of the instances 3350 // that you specified in the GetInstancesHealthStatus request. 3351 Status map[string]*string `type:"map"` 3352} 3353 3354// String returns the string representation 3355func (s GetInstancesHealthStatusOutput) String() string { 3356 return awsutil.Prettify(s) 3357} 3358 3359// GoString returns the string representation 3360func (s GetInstancesHealthStatusOutput) GoString() string { 3361 return s.String() 3362} 3363 3364// SetNextToken sets the NextToken field's value. 3365func (s *GetInstancesHealthStatusOutput) SetNextToken(v string) *GetInstancesHealthStatusOutput { 3366 s.NextToken = &v 3367 return s 3368} 3369 3370// SetStatus sets the Status field's value. 3371func (s *GetInstancesHealthStatusOutput) SetStatus(v map[string]*string) *GetInstancesHealthStatusOutput { 3372 s.Status = v 3373 return s 3374} 3375 3376type GetNamespaceInput struct { 3377 _ struct{} `type:"structure"` 3378 3379 // The ID of the namespace that you want to get information about. 3380 // 3381 // Id is a required field 3382 Id *string `type:"string" required:"true"` 3383} 3384 3385// String returns the string representation 3386func (s GetNamespaceInput) String() string { 3387 return awsutil.Prettify(s) 3388} 3389 3390// GoString returns the string representation 3391func (s GetNamespaceInput) GoString() string { 3392 return s.String() 3393} 3394 3395// Validate inspects the fields of the type to determine if they are valid. 3396func (s *GetNamespaceInput) Validate() error { 3397 invalidParams := request.ErrInvalidParams{Context: "GetNamespaceInput"} 3398 if s.Id == nil { 3399 invalidParams.Add(request.NewErrParamRequired("Id")) 3400 } 3401 3402 if invalidParams.Len() > 0 { 3403 return invalidParams 3404 } 3405 return nil 3406} 3407 3408// SetId sets the Id field's value. 3409func (s *GetNamespaceInput) SetId(v string) *GetNamespaceInput { 3410 s.Id = &v 3411 return s 3412} 3413 3414type GetNamespaceOutput struct { 3415 _ struct{} `type:"structure"` 3416 3417 // A complex type that contains information about the specified namespace. 3418 Namespace *Namespace `type:"structure"` 3419} 3420 3421// String returns the string representation 3422func (s GetNamespaceOutput) String() string { 3423 return awsutil.Prettify(s) 3424} 3425 3426// GoString returns the string representation 3427func (s GetNamespaceOutput) GoString() string { 3428 return s.String() 3429} 3430 3431// SetNamespace sets the Namespace field's value. 3432func (s *GetNamespaceOutput) SetNamespace(v *Namespace) *GetNamespaceOutput { 3433 s.Namespace = v 3434 return s 3435} 3436 3437type GetOperationInput struct { 3438 _ struct{} `type:"structure"` 3439 3440 // The ID of the operation that you want to get more information about. 3441 // 3442 // OperationId is a required field 3443 OperationId *string `type:"string" required:"true"` 3444} 3445 3446// String returns the string representation 3447func (s GetOperationInput) String() string { 3448 return awsutil.Prettify(s) 3449} 3450 3451// GoString returns the string representation 3452func (s GetOperationInput) GoString() string { 3453 return s.String() 3454} 3455 3456// Validate inspects the fields of the type to determine if they are valid. 3457func (s *GetOperationInput) Validate() error { 3458 invalidParams := request.ErrInvalidParams{Context: "GetOperationInput"} 3459 if s.OperationId == nil { 3460 invalidParams.Add(request.NewErrParamRequired("OperationId")) 3461 } 3462 3463 if invalidParams.Len() > 0 { 3464 return invalidParams 3465 } 3466 return nil 3467} 3468 3469// SetOperationId sets the OperationId field's value. 3470func (s *GetOperationInput) SetOperationId(v string) *GetOperationInput { 3471 s.OperationId = &v 3472 return s 3473} 3474 3475type GetOperationOutput struct { 3476 _ struct{} `type:"structure"` 3477 3478 // A complex type that contains information about the operation. 3479 Operation *Operation `type:"structure"` 3480} 3481 3482// String returns the string representation 3483func (s GetOperationOutput) String() string { 3484 return awsutil.Prettify(s) 3485} 3486 3487// GoString returns the string representation 3488func (s GetOperationOutput) GoString() string { 3489 return s.String() 3490} 3491 3492// SetOperation sets the Operation field's value. 3493func (s *GetOperationOutput) SetOperation(v *Operation) *GetOperationOutput { 3494 s.Operation = v 3495 return s 3496} 3497 3498type GetServiceInput struct { 3499 _ struct{} `type:"structure"` 3500 3501 // The ID of the service that you want to get settings for. 3502 // 3503 // Id is a required field 3504 Id *string `type:"string" required:"true"` 3505} 3506 3507// String returns the string representation 3508func (s GetServiceInput) String() string { 3509 return awsutil.Prettify(s) 3510} 3511 3512// GoString returns the string representation 3513func (s GetServiceInput) GoString() string { 3514 return s.String() 3515} 3516 3517// Validate inspects the fields of the type to determine if they are valid. 3518func (s *GetServiceInput) Validate() error { 3519 invalidParams := request.ErrInvalidParams{Context: "GetServiceInput"} 3520 if s.Id == nil { 3521 invalidParams.Add(request.NewErrParamRequired("Id")) 3522 } 3523 3524 if invalidParams.Len() > 0 { 3525 return invalidParams 3526 } 3527 return nil 3528} 3529 3530// SetId sets the Id field's value. 3531func (s *GetServiceInput) SetId(v string) *GetServiceInput { 3532 s.Id = &v 3533 return s 3534} 3535 3536type GetServiceOutput struct { 3537 _ struct{} `type:"structure"` 3538 3539 // A complex type that contains information about the service. 3540 Service *Service `type:"structure"` 3541} 3542 3543// String returns the string representation 3544func (s GetServiceOutput) String() string { 3545 return awsutil.Prettify(s) 3546} 3547 3548// GoString returns the string representation 3549func (s GetServiceOutput) GoString() string { 3550 return s.String() 3551} 3552 3553// SetService sets the Service field's value. 3554func (s *GetServiceOutput) SetService(v *Service) *GetServiceOutput { 3555 s.Service = v 3556 return s 3557} 3558 3559// Public DNS namespaces only. A complex type that contains settings for an 3560// optional health check. If you specify settings for a health check, AWS Cloud 3561// Map associates the health check with the records that you specify in DnsConfig. 3562// 3563// If you specify a health check configuration, you can specify either HealthCheckCustomConfig 3564// or HealthCheckConfig but not both. 3565// 3566// Health checks are basic Route 53 health checks that monitor an AWS endpoint. 3567// For information about pricing for health checks, see Amazon Route 53 Pricing 3568// (http://aws.amazon.com/route53/pricing/). 3569// 3570// Note the following about configuring health checks. 3571// 3572// A and AAAA records 3573// 3574// If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 3575// Map creates a health check that uses the IPv4 address to check the health 3576// of the resource. If the endpoint that is specified by the IPv4 address is 3577// unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 3578// 3579// CNAME records 3580// 3581// You can't specify settings for HealthCheckConfig when the DNSConfig includes 3582// CNAME for the value of Type. If you do, the CreateService request will fail 3583// with an InvalidInput error. 3584// 3585// Request interval 3586// 3587// A Route 53 health checker in each health-checking region sends a health check 3588// request to an endpoint every 30 seconds. On average, your endpoint receives 3589// a health check request about every two seconds. However, health checkers 3590// don't coordinate with one another, so you'll sometimes see several requests 3591// per second followed by a few seconds with no health checks at all. 3592// 3593// Health checking regions 3594// 3595// Health checkers perform checks from all Route 53 health-checking regions. 3596// For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 3597// 3598// Alias records 3599// 3600// When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 3601// AWS Cloud Map creates a Route 53 alias record. Note the following: 3602// 3603// * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 3604// When EvaluateTargetHealth is true, the alias record inherits the health 3605// of the referenced AWS resource. such as an ELB load balancer. For more 3606// information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 3607// 3608// * If you include HealthCheckConfig and then use the service to register 3609// an instance that creates an alias record, Route 53 doesn't create the 3610// health check. 3611// 3612// Charges for health checks 3613// 3614// Health checks are basic Route 53 health checks that monitor an AWS endpoint. 3615// For information about pricing for health checks, see Amazon Route 53 Pricing 3616// (http://aws.amazon.com/route53/pricing/). 3617type HealthCheckConfig struct { 3618 _ struct{} `type:"structure"` 3619 3620 // The number of consecutive health checks that an endpoint must pass or fail 3621 // for Route 53 to change the current status of the endpoint from unhealthy 3622 // to healthy or vice versa. For more information, see How Route 53 Determines 3623 // Whether an Endpoint Is Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) 3624 // in the Route 53 Developer Guide. 3625 FailureThreshold *int64 `min:"1" type:"integer"` 3626 3627 // The path that you want Route 53 to request when performing health checks. 3628 // The path can be any value for which your endpoint will return an HTTP status 3629 // code of 2xx or 3xx when the endpoint is healthy, such as the file /docs/route53-health-check.html. 3630 // Route 53 automatically adds the DNS name for the service. If you don't specify 3631 // a value for ResourcePath, the default value is /. 3632 // 3633 // If you specify TCP for Type, you must not specify a value for ResourcePath. 3634 ResourcePath *string `type:"string"` 3635 3636 // The type of health check that you want to create, which indicates how Route 3637 // 53 determines whether an endpoint is healthy. 3638 // 3639 // You can't change the value of Type after you create a health check. 3640 // 3641 // You can create the following types of health checks: 3642 // 3643 // * HTTP: Route 53 tries to establish a TCP connection. If successful, Route 3644 // 53 submits an HTTP request and waits for an HTTP status code of 200 or 3645 // greater and less than 400. 3646 // 3647 // * HTTPS: Route 53 tries to establish a TCP connection. If successful, 3648 // Route 53 submits an HTTPS request and waits for an HTTP status code of 3649 // 200 or greater and less than 400. If you specify HTTPS for the value of 3650 // Type, the endpoint must support TLS v1.0 or later. 3651 // 3652 // * TCP: Route 53 tries to establish a TCP connection. If you specify TCP 3653 // for Type, don't specify a value for ResourcePath. 3654 // 3655 // For more information, see How Route 53 Determines Whether an Endpoint Is 3656 // Healthy (http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/dns-failover-determining-health-of-endpoints.html) 3657 // in the Route 53 Developer Guide. 3658 // 3659 // Type is a required field 3660 Type *string `type:"string" required:"true" enum:"HealthCheckType"` 3661} 3662 3663// String returns the string representation 3664func (s HealthCheckConfig) String() string { 3665 return awsutil.Prettify(s) 3666} 3667 3668// GoString returns the string representation 3669func (s HealthCheckConfig) GoString() string { 3670 return s.String() 3671} 3672 3673// Validate inspects the fields of the type to determine if they are valid. 3674func (s *HealthCheckConfig) Validate() error { 3675 invalidParams := request.ErrInvalidParams{Context: "HealthCheckConfig"} 3676 if s.FailureThreshold != nil && *s.FailureThreshold < 1 { 3677 invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) 3678 } 3679 if s.Type == nil { 3680 invalidParams.Add(request.NewErrParamRequired("Type")) 3681 } 3682 3683 if invalidParams.Len() > 0 { 3684 return invalidParams 3685 } 3686 return nil 3687} 3688 3689// SetFailureThreshold sets the FailureThreshold field's value. 3690func (s *HealthCheckConfig) SetFailureThreshold(v int64) *HealthCheckConfig { 3691 s.FailureThreshold = &v 3692 return s 3693} 3694 3695// SetResourcePath sets the ResourcePath field's value. 3696func (s *HealthCheckConfig) SetResourcePath(v string) *HealthCheckConfig { 3697 s.ResourcePath = &v 3698 return s 3699} 3700 3701// SetType sets the Type field's value. 3702func (s *HealthCheckConfig) SetType(v string) *HealthCheckConfig { 3703 s.Type = &v 3704 return s 3705} 3706 3707// A complex type that contains information about an optional custom health 3708// check. A custom health check, which requires that you use a third-party health 3709// checker to evaluate the health of your resources, is useful in the following 3710// circumstances: 3711// 3712// * You can't use a health check that is defined by HealthCheckConfig because 3713// the resource isn't available over the internet. For example, you can use 3714// a custom health check when the instance is in an Amazon VPC. (To check 3715// the health of resources in a VPC, the health checker must also be in the 3716// VPC.) 3717// 3718// * You want to use a third-party health checker regardless of where your 3719// resources are. 3720// 3721// If you specify a health check configuration, you can specify either HealthCheckCustomConfig 3722// or HealthCheckConfig but not both. 3723// 3724// To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus 3725// request. Cloud Map doesn't monitor the status of the resource, it just keeps 3726// a record of the status specified in the most recent UpdateInstanceCustomHealthStatus 3727// request. 3728// 3729// Here's how custom health checks work: 3730// 3731// You create a service and specify a value for FailureThreshold. 3732// 3733// The failure threshold indicates the number of 30-second intervals you want 3734// AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus 3735// request and the time that AWS Cloud Map stops routing internet traffic to 3736// the corresponding resource. 3737// 3738// You register an instance. 3739// 3740// You configure a third-party health checker to monitor the resource that is 3741// associated with the new instance. 3742// 3743// AWS Cloud Map doesn't check the health of the resource directly. 3744// 3745// The third-party health-checker determines that the resource is unhealthy 3746// and notifies your application. 3747// 3748// Your application submits an UpdateInstanceCustomHealthStatus request. 3749// 3750// AWS Cloud Map waits for (FailureThreshold x 30) seconds. 3751// 3752// If another UpdateInstanceCustomHealthStatus request doesn't arrive during 3753// that time to change the status back to healthy, AWS Cloud Map stops routing 3754// traffic to the resource. 3755// 3756// Note the following about configuring custom health checks. 3757type HealthCheckCustomConfig struct { 3758 _ struct{} `type:"structure"` 3759 3760 // The number of 30-second intervals that you want Cloud Map to wait after receiving 3761 // an UpdateInstanceCustomHealthStatus request before it changes the health 3762 // status of a service instance. For example, suppose you specify a value of 3763 // 2 for FailureTheshold, and then your application sends an UpdateInstanceCustomHealthStatus 3764 // request. Cloud Map waits for approximately 60 seconds (2 x 30) before changing 3765 // the status of the service instance based on that request. 3766 // 3767 // Sending a second or subsequent UpdateInstanceCustomHealthStatus request with 3768 // the same value before FailureThreshold x 30 seconds has passed doesn't accelerate 3769 // the change. Cloud Map still waits FailureThreshold x 30 seconds after the 3770 // first request to make the change. 3771 FailureThreshold *int64 `min:"1" type:"integer"` 3772} 3773 3774// String returns the string representation 3775func (s HealthCheckCustomConfig) String() string { 3776 return awsutil.Prettify(s) 3777} 3778 3779// GoString returns the string representation 3780func (s HealthCheckCustomConfig) GoString() string { 3781 return s.String() 3782} 3783 3784// Validate inspects the fields of the type to determine if they are valid. 3785func (s *HealthCheckCustomConfig) Validate() error { 3786 invalidParams := request.ErrInvalidParams{Context: "HealthCheckCustomConfig"} 3787 if s.FailureThreshold != nil && *s.FailureThreshold < 1 { 3788 invalidParams.Add(request.NewErrParamMinValue("FailureThreshold", 1)) 3789 } 3790 3791 if invalidParams.Len() > 0 { 3792 return invalidParams 3793 } 3794 return nil 3795} 3796 3797// SetFailureThreshold sets the FailureThreshold field's value. 3798func (s *HealthCheckCustomConfig) SetFailureThreshold(v int64) *HealthCheckCustomConfig { 3799 s.FailureThreshold = &v 3800 return s 3801} 3802 3803// In a response to a DiscoverInstance request, HttpInstanceSummary contains 3804// information about one instance that matches the values that you specified 3805// in the request. 3806type HttpInstanceSummary struct { 3807 _ struct{} `type:"structure"` 3808 3809 // If you included any attributes when you registered the instance, the values 3810 // of those attributes. 3811 Attributes map[string]*string `type:"map"` 3812 3813 // If you configured health checking in the service, the current health status 3814 // of the service instance. 3815 HealthStatus *string `type:"string" enum:"HealthStatus"` 3816 3817 // The ID of an instance that matches the values that you specified in the request. 3818 InstanceId *string `type:"string"` 3819 3820 // The name of the namespace that you specified when you registered the instance. 3821 NamespaceName *string `type:"string"` 3822 3823 // The name of the service that you specified when you registered the instance. 3824 ServiceName *string `type:"string"` 3825} 3826 3827// String returns the string representation 3828func (s HttpInstanceSummary) String() string { 3829 return awsutil.Prettify(s) 3830} 3831 3832// GoString returns the string representation 3833func (s HttpInstanceSummary) GoString() string { 3834 return s.String() 3835} 3836 3837// SetAttributes sets the Attributes field's value. 3838func (s *HttpInstanceSummary) SetAttributes(v map[string]*string) *HttpInstanceSummary { 3839 s.Attributes = v 3840 return s 3841} 3842 3843// SetHealthStatus sets the HealthStatus field's value. 3844func (s *HttpInstanceSummary) SetHealthStatus(v string) *HttpInstanceSummary { 3845 s.HealthStatus = &v 3846 return s 3847} 3848 3849// SetInstanceId sets the InstanceId field's value. 3850func (s *HttpInstanceSummary) SetInstanceId(v string) *HttpInstanceSummary { 3851 s.InstanceId = &v 3852 return s 3853} 3854 3855// SetNamespaceName sets the NamespaceName field's value. 3856func (s *HttpInstanceSummary) SetNamespaceName(v string) *HttpInstanceSummary { 3857 s.NamespaceName = &v 3858 return s 3859} 3860 3861// SetServiceName sets the ServiceName field's value. 3862func (s *HttpInstanceSummary) SetServiceName(v string) *HttpInstanceSummary { 3863 s.ServiceName = &v 3864 return s 3865} 3866 3867// A complex type that contains the name of an HTTP namespace. 3868type HttpProperties struct { 3869 _ struct{} `type:"structure"` 3870 3871 // The name of an HTTP namespace. 3872 HttpName *string `type:"string"` 3873} 3874 3875// String returns the string representation 3876func (s HttpProperties) String() string { 3877 return awsutil.Prettify(s) 3878} 3879 3880// GoString returns the string representation 3881func (s HttpProperties) GoString() string { 3882 return s.String() 3883} 3884 3885// SetHttpName sets the HttpName field's value. 3886func (s *HttpProperties) SetHttpName(v string) *HttpProperties { 3887 s.HttpName = &v 3888 return s 3889} 3890 3891// A complex type that contains information about an instance that AWS Cloud 3892// Map creates when you submit a RegisterInstance request. 3893type Instance struct { 3894 _ struct{} `type:"structure"` 3895 3896 // A string map that contains the following information for the service that 3897 // you specify in ServiceId: 3898 // 3899 // * The attributes that apply to the records that are defined in the service. 3900 // 3901 // * For each attribute, the applicable value. 3902 // 3903 // Supported attribute keys include the following: 3904 // 3905 // AWS_ALIAS_DNS_NAME 3906 // 3907 // If you want AWS Cloud Map to create a Route 53 alias record that routes traffic 3908 // to an Elastic Load Balancing load balancer, specify the DNS name that is 3909 // associated with the load balancer. For information about how to get the DNS 3910 // name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html). 3911 // 3912 // Note the following: 3913 // 3914 // * The configuration for the service that is specified by ServiceId must 3915 // include settings for an A record, an AAAA record, or both. 3916 // 3917 // * In the service that is specified by ServiceId, the value of RoutingPolicy 3918 // must be WEIGHTED. 3919 // 3920 // * If the service that is specified by ServiceId includes HealthCheckConfig 3921 // settings, AWS Cloud Map will create the health check, but it won't associate 3922 // the health check with the alias record. 3923 // 3924 // * Auto naming currently doesn't support creating alias records that route 3925 // traffic to AWS resources other than ELB load balancers. 3926 // 3927 // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values 3928 // for any of the AWS_INSTANCE attributes. 3929 // 3930 // AWS_INSTANCE_CNAME 3931 // 3932 // If the service configuration includes a CNAME record, the domain name that 3933 // you want Route 53 to return in response to DNS queries, for example, example.com. 3934 // 3935 // This value is required if the service specified by ServiceId includes settings 3936 // for an CNAME record. 3937 // 3938 // AWS_INSTANCE_IPV4 3939 // 3940 // If the service configuration includes an A record, the IPv4 address that 3941 // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. 3942 // 3943 // This value is required if the service specified by ServiceId includes settings 3944 // for an A record. If the service includes settings for an SRV record, you 3945 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 3946 // 3947 // AWS_INSTANCE_IPV6 3948 // 3949 // If the service configuration includes an AAAA record, the IPv6 address that 3950 // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 3951 // 3952 // This value is required if the service specified by ServiceId includes settings 3953 // for an AAAA record. If the service includes settings for an SRV record, you 3954 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 3955 // 3956 // AWS_INSTANCE_PORT 3957 // 3958 // If the service includes an SRV record, the value that you want Route 53 to 3959 // return for the port. 3960 // 3961 // If the service includes HealthCheckConfig, the port on the endpoint that 3962 // you want Route 53 to send requests to. 3963 // 3964 // This value is required if you specified settings for an SRV record when you 3965 // created the service. 3966 Attributes map[string]*string `type:"map"` 3967 3968 // A unique string that identifies the request and that allows failed RegisterInstance 3969 // requests to be retried without the risk of executing the operation twice. 3970 // You must use a unique CreatorRequestId string every time you submit a RegisterInstance 3971 // request if you're registering additional instances for the same namespace 3972 // and service. CreatorRequestId can be any unique string, for example, a date/time 3973 // stamp. 3974 CreatorRequestId *string `type:"string"` 3975 3976 // An identifier that you want to associate with the instance. Note the following: 3977 // 3978 // * If the service that is specified by ServiceId includes settings for 3979 // an SRV record, the value of InstanceId is automatically included as part 3980 // of the value for the SRV record. For more information, see DnsRecord$Type. 3981 // 3982 // * You can use this value to update an existing instance. 3983 // 3984 // * To register a new instance, you must specify a value that is unique 3985 // among instances that you register by using the same service. 3986 // 3987 // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates 3988 // the existing DNS records. If there's also an existing health check, AWS 3989 // Cloud Map deletes the old health check and creates a new one. The health 3990 // check isn't deleted immediately, so it will still appear for a while if 3991 // you submit a ListHealthChecks request, for example. 3992 // 3993 // Id is a required field 3994 Id *string `type:"string" required:"true"` 3995} 3996 3997// String returns the string representation 3998func (s Instance) String() string { 3999 return awsutil.Prettify(s) 4000} 4001 4002// GoString returns the string representation 4003func (s Instance) GoString() string { 4004 return s.String() 4005} 4006 4007// SetAttributes sets the Attributes field's value. 4008func (s *Instance) SetAttributes(v map[string]*string) *Instance { 4009 s.Attributes = v 4010 return s 4011} 4012 4013// SetCreatorRequestId sets the CreatorRequestId field's value. 4014func (s *Instance) SetCreatorRequestId(v string) *Instance { 4015 s.CreatorRequestId = &v 4016 return s 4017} 4018 4019// SetId sets the Id field's value. 4020func (s *Instance) SetId(v string) *Instance { 4021 s.Id = &v 4022 return s 4023} 4024 4025// A complex type that contains information about the instances that you registered 4026// by using a specified service. 4027type InstanceSummary struct { 4028 _ struct{} `type:"structure"` 4029 4030 // A string map that contains the following information: 4031 // 4032 // * The attributes that are associate with the instance. 4033 // 4034 // * For each attribute, the applicable value. 4035 // 4036 // Supported attribute keys include the following: 4037 // 4038 // * AWS_ALIAS_DNS_NAME: For an alias record that routes traffic to an Elastic 4039 // Load Balancing load balancer, the DNS name that is associated with the 4040 // load balancer. 4041 // 4042 // * AWS_INSTANCE_CNAME: For a CNAME record, the domain name that Route 53 4043 // returns in response to DNS queries, for example, example.com. 4044 // 4045 // * AWS_INSTANCE_IPV4: For an A record, the IPv4 address that Route 53 returns 4046 // in response to DNS queries, for example, 192.0.2.44. 4047 // 4048 // * AWS_INSTANCE_IPV6: For an AAAA record, the IPv6 address that Route 53 4049 // returns in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 4050 // 4051 // * AWS_INSTANCE_PORT: For an SRV record, the value that Route 53 returns 4052 // for the port. In addition, if the service includes HealthCheckConfig, 4053 // the port on the endpoint that Route 53 sends requests to. 4054 Attributes map[string]*string `type:"map"` 4055 4056 // The ID for an instance that you created by using a specified service. 4057 Id *string `type:"string"` 4058} 4059 4060// String returns the string representation 4061func (s InstanceSummary) String() string { 4062 return awsutil.Prettify(s) 4063} 4064 4065// GoString returns the string representation 4066func (s InstanceSummary) GoString() string { 4067 return s.String() 4068} 4069 4070// SetAttributes sets the Attributes field's value. 4071func (s *InstanceSummary) SetAttributes(v map[string]*string) *InstanceSummary { 4072 s.Attributes = v 4073 return s 4074} 4075 4076// SetId sets the Id field's value. 4077func (s *InstanceSummary) SetId(v string) *InstanceSummary { 4078 s.Id = &v 4079 return s 4080} 4081 4082type ListInstancesInput struct { 4083 _ struct{} `type:"structure"` 4084 4085 // The maximum number of instances that you want AWS Cloud Map to return in 4086 // the response to a ListInstances request. If you don't specify a value for 4087 // MaxResults, AWS Cloud Map returns up to 100 instances. 4088 MaxResults *int64 `min:"1" type:"integer"` 4089 4090 // For the first ListInstances request, omit this value. 4091 // 4092 // If more than MaxResults instances match the specified criteria, you can submit 4093 // another ListInstances request to get the next group of results. Specify the 4094 // value of NextToken from the previous response in the next request. 4095 NextToken *string `type:"string"` 4096 4097 // The ID of the service that you want to list instances for. 4098 // 4099 // ServiceId is a required field 4100 ServiceId *string `type:"string" required:"true"` 4101} 4102 4103// String returns the string representation 4104func (s ListInstancesInput) String() string { 4105 return awsutil.Prettify(s) 4106} 4107 4108// GoString returns the string representation 4109func (s ListInstancesInput) GoString() string { 4110 return s.String() 4111} 4112 4113// Validate inspects the fields of the type to determine if they are valid. 4114func (s *ListInstancesInput) Validate() error { 4115 invalidParams := request.ErrInvalidParams{Context: "ListInstancesInput"} 4116 if s.MaxResults != nil && *s.MaxResults < 1 { 4117 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4118 } 4119 if s.ServiceId == nil { 4120 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 4121 } 4122 4123 if invalidParams.Len() > 0 { 4124 return invalidParams 4125 } 4126 return nil 4127} 4128 4129// SetMaxResults sets the MaxResults field's value. 4130func (s *ListInstancesInput) SetMaxResults(v int64) *ListInstancesInput { 4131 s.MaxResults = &v 4132 return s 4133} 4134 4135// SetNextToken sets the NextToken field's value. 4136func (s *ListInstancesInput) SetNextToken(v string) *ListInstancesInput { 4137 s.NextToken = &v 4138 return s 4139} 4140 4141// SetServiceId sets the ServiceId field's value. 4142func (s *ListInstancesInput) SetServiceId(v string) *ListInstancesInput { 4143 s.ServiceId = &v 4144 return s 4145} 4146 4147type ListInstancesOutput struct { 4148 _ struct{} `type:"structure"` 4149 4150 // Summary information about the instances that are associated with the specified 4151 // service. 4152 Instances []*InstanceSummary `type:"list"` 4153 4154 // If more than MaxResults instances match the specified criteria, you can submit 4155 // another ListInstances request to get the next group of results. Specify the 4156 // value of NextToken from the previous response in the next request. 4157 NextToken *string `type:"string"` 4158} 4159 4160// String returns the string representation 4161func (s ListInstancesOutput) String() string { 4162 return awsutil.Prettify(s) 4163} 4164 4165// GoString returns the string representation 4166func (s ListInstancesOutput) GoString() string { 4167 return s.String() 4168} 4169 4170// SetInstances sets the Instances field's value. 4171func (s *ListInstancesOutput) SetInstances(v []*InstanceSummary) *ListInstancesOutput { 4172 s.Instances = v 4173 return s 4174} 4175 4176// SetNextToken sets the NextToken field's value. 4177func (s *ListInstancesOutput) SetNextToken(v string) *ListInstancesOutput { 4178 s.NextToken = &v 4179 return s 4180} 4181 4182type ListNamespacesInput struct { 4183 _ struct{} `type:"structure"` 4184 4185 // A complex type that contains specifications for the namespaces that you want 4186 // to list. 4187 // 4188 // If you specify more than one filter, a namespace must match all filters to 4189 // be returned by ListNamespaces. 4190 Filters []*NamespaceFilter `type:"list"` 4191 4192 // The maximum number of namespaces that you want AWS Cloud Map to return in 4193 // the response to a ListNamespaces request. If you don't specify a value for 4194 // MaxResults, AWS Cloud Map returns up to 100 namespaces. 4195 MaxResults *int64 `min:"1" type:"integer"` 4196 4197 // For the first ListNamespaces request, omit this value. 4198 // 4199 // If the response contains NextToken, submit another ListNamespaces request 4200 // to get the next group of results. Specify the value of NextToken from the 4201 // previous response in the next request. 4202 // 4203 // AWS Cloud Map gets MaxResults namespaces and then filters them based on the 4204 // specified criteria. It's possible that no namespaces in the first MaxResults 4205 // namespaces matched the specified criteria but that subsequent groups of MaxResults 4206 // namespaces do contain namespaces that match the criteria. 4207 NextToken *string `type:"string"` 4208} 4209 4210// String returns the string representation 4211func (s ListNamespacesInput) String() string { 4212 return awsutil.Prettify(s) 4213} 4214 4215// GoString returns the string representation 4216func (s ListNamespacesInput) GoString() string { 4217 return s.String() 4218} 4219 4220// Validate inspects the fields of the type to determine if they are valid. 4221func (s *ListNamespacesInput) Validate() error { 4222 invalidParams := request.ErrInvalidParams{Context: "ListNamespacesInput"} 4223 if s.MaxResults != nil && *s.MaxResults < 1 { 4224 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4225 } 4226 if s.Filters != nil { 4227 for i, v := range s.Filters { 4228 if v == nil { 4229 continue 4230 } 4231 if err := v.Validate(); err != nil { 4232 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 4233 } 4234 } 4235 } 4236 4237 if invalidParams.Len() > 0 { 4238 return invalidParams 4239 } 4240 return nil 4241} 4242 4243// SetFilters sets the Filters field's value. 4244func (s *ListNamespacesInput) SetFilters(v []*NamespaceFilter) *ListNamespacesInput { 4245 s.Filters = v 4246 return s 4247} 4248 4249// SetMaxResults sets the MaxResults field's value. 4250func (s *ListNamespacesInput) SetMaxResults(v int64) *ListNamespacesInput { 4251 s.MaxResults = &v 4252 return s 4253} 4254 4255// SetNextToken sets the NextToken field's value. 4256func (s *ListNamespacesInput) SetNextToken(v string) *ListNamespacesInput { 4257 s.NextToken = &v 4258 return s 4259} 4260 4261type ListNamespacesOutput struct { 4262 _ struct{} `type:"structure"` 4263 4264 // An array that contains one NamespaceSummary object for each namespace that 4265 // matches the specified filter criteria. 4266 Namespaces []*NamespaceSummary `type:"list"` 4267 4268 // If the response contains NextToken, submit another ListNamespaces request 4269 // to get the next group of results. Specify the value of NextToken from the 4270 // previous response in the next request. 4271 // 4272 // AWS Cloud Map gets MaxResults namespaces and then filters them based on the 4273 // specified criteria. It's possible that no namespaces in the first MaxResults 4274 // namespaces matched the specified criteria but that subsequent groups of MaxResults 4275 // namespaces do contain namespaces that match the criteria. 4276 NextToken *string `type:"string"` 4277} 4278 4279// String returns the string representation 4280func (s ListNamespacesOutput) String() string { 4281 return awsutil.Prettify(s) 4282} 4283 4284// GoString returns the string representation 4285func (s ListNamespacesOutput) GoString() string { 4286 return s.String() 4287} 4288 4289// SetNamespaces sets the Namespaces field's value. 4290func (s *ListNamespacesOutput) SetNamespaces(v []*NamespaceSummary) *ListNamespacesOutput { 4291 s.Namespaces = v 4292 return s 4293} 4294 4295// SetNextToken sets the NextToken field's value. 4296func (s *ListNamespacesOutput) SetNextToken(v string) *ListNamespacesOutput { 4297 s.NextToken = &v 4298 return s 4299} 4300 4301type ListOperationsInput struct { 4302 _ struct{} `type:"structure"` 4303 4304 // A complex type that contains specifications for the operations that you want 4305 // to list, for example, operations that you started between a specified start 4306 // date and end date. 4307 // 4308 // If you specify more than one filter, an operation must match all filters 4309 // to be returned by ListOperations. 4310 Filters []*OperationFilter `type:"list"` 4311 4312 // The maximum number of items that you want AWS Cloud Map to return in the 4313 // response to a ListOperations request. If you don't specify a value for MaxResults, 4314 // AWS Cloud Map returns up to 100 operations. 4315 MaxResults *int64 `min:"1" type:"integer"` 4316 4317 // For the first ListOperations request, omit this value. 4318 // 4319 // If the response contains NextToken, submit another ListOperations request 4320 // to get the next group of results. Specify the value of NextToken from the 4321 // previous response in the next request. 4322 // 4323 // AWS Cloud Map gets MaxResults operations and then filters them based on the 4324 // specified criteria. It's possible that no operations in the first MaxResults 4325 // operations matched the specified criteria but that subsequent groups of MaxResults 4326 // operations do contain operations that match the criteria. 4327 NextToken *string `type:"string"` 4328} 4329 4330// String returns the string representation 4331func (s ListOperationsInput) String() string { 4332 return awsutil.Prettify(s) 4333} 4334 4335// GoString returns the string representation 4336func (s ListOperationsInput) GoString() string { 4337 return s.String() 4338} 4339 4340// Validate inspects the fields of the type to determine if they are valid. 4341func (s *ListOperationsInput) Validate() error { 4342 invalidParams := request.ErrInvalidParams{Context: "ListOperationsInput"} 4343 if s.MaxResults != nil && *s.MaxResults < 1 { 4344 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4345 } 4346 if s.Filters != nil { 4347 for i, v := range s.Filters { 4348 if v == nil { 4349 continue 4350 } 4351 if err := v.Validate(); err != nil { 4352 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 4353 } 4354 } 4355 } 4356 4357 if invalidParams.Len() > 0 { 4358 return invalidParams 4359 } 4360 return nil 4361} 4362 4363// SetFilters sets the Filters field's value. 4364func (s *ListOperationsInput) SetFilters(v []*OperationFilter) *ListOperationsInput { 4365 s.Filters = v 4366 return s 4367} 4368 4369// SetMaxResults sets the MaxResults field's value. 4370func (s *ListOperationsInput) SetMaxResults(v int64) *ListOperationsInput { 4371 s.MaxResults = &v 4372 return s 4373} 4374 4375// SetNextToken sets the NextToken field's value. 4376func (s *ListOperationsInput) SetNextToken(v string) *ListOperationsInput { 4377 s.NextToken = &v 4378 return s 4379} 4380 4381type ListOperationsOutput struct { 4382 _ struct{} `type:"structure"` 4383 4384 // If the response contains NextToken, submit another ListOperations request 4385 // to get the next group of results. Specify the value of NextToken from the 4386 // previous response in the next request. 4387 // 4388 // AWS Cloud Map gets MaxResults operations and then filters them based on the 4389 // specified criteria. It's possible that no operations in the first MaxResults 4390 // operations matched the specified criteria but that subsequent groups of MaxResults 4391 // operations do contain operations that match the criteria. 4392 NextToken *string `type:"string"` 4393 4394 // Summary information about the operations that match the specified criteria. 4395 Operations []*OperationSummary `type:"list"` 4396} 4397 4398// String returns the string representation 4399func (s ListOperationsOutput) String() string { 4400 return awsutil.Prettify(s) 4401} 4402 4403// GoString returns the string representation 4404func (s ListOperationsOutput) GoString() string { 4405 return s.String() 4406} 4407 4408// SetNextToken sets the NextToken field's value. 4409func (s *ListOperationsOutput) SetNextToken(v string) *ListOperationsOutput { 4410 s.NextToken = &v 4411 return s 4412} 4413 4414// SetOperations sets the Operations field's value. 4415func (s *ListOperationsOutput) SetOperations(v []*OperationSummary) *ListOperationsOutput { 4416 s.Operations = v 4417 return s 4418} 4419 4420type ListServicesInput struct { 4421 _ struct{} `type:"structure"` 4422 4423 // A complex type that contains specifications for the namespaces that you want 4424 // to list services for. 4425 // 4426 // If you specify more than one filter, an operation must match all filters 4427 // to be returned by ListServices. 4428 Filters []*ServiceFilter `type:"list"` 4429 4430 // The maximum number of services that you want AWS Cloud Map to return in the 4431 // response to a ListServices request. If you don't specify a value for MaxResults, 4432 // AWS Cloud Map returns up to 100 services. 4433 MaxResults *int64 `min:"1" type:"integer"` 4434 4435 // For the first ListServices request, omit this value. 4436 // 4437 // If the response contains NextToken, submit another ListServices request to 4438 // get the next group of results. Specify the value of NextToken from the previous 4439 // response in the next request. 4440 // 4441 // AWS Cloud Map gets MaxResults services and then filters them based on the 4442 // specified criteria. It's possible that no services in the first MaxResults 4443 // services matched the specified criteria but that subsequent groups of MaxResults 4444 // services do contain services that match the criteria. 4445 NextToken *string `type:"string"` 4446} 4447 4448// String returns the string representation 4449func (s ListServicesInput) String() string { 4450 return awsutil.Prettify(s) 4451} 4452 4453// GoString returns the string representation 4454func (s ListServicesInput) GoString() string { 4455 return s.String() 4456} 4457 4458// Validate inspects the fields of the type to determine if they are valid. 4459func (s *ListServicesInput) Validate() error { 4460 invalidParams := request.ErrInvalidParams{Context: "ListServicesInput"} 4461 if s.MaxResults != nil && *s.MaxResults < 1 { 4462 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 4463 } 4464 if s.Filters != nil { 4465 for i, v := range s.Filters { 4466 if v == nil { 4467 continue 4468 } 4469 if err := v.Validate(); err != nil { 4470 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Filters", i), err.(request.ErrInvalidParams)) 4471 } 4472 } 4473 } 4474 4475 if invalidParams.Len() > 0 { 4476 return invalidParams 4477 } 4478 return nil 4479} 4480 4481// SetFilters sets the Filters field's value. 4482func (s *ListServicesInput) SetFilters(v []*ServiceFilter) *ListServicesInput { 4483 s.Filters = v 4484 return s 4485} 4486 4487// SetMaxResults sets the MaxResults field's value. 4488func (s *ListServicesInput) SetMaxResults(v int64) *ListServicesInput { 4489 s.MaxResults = &v 4490 return s 4491} 4492 4493// SetNextToken sets the NextToken field's value. 4494func (s *ListServicesInput) SetNextToken(v string) *ListServicesInput { 4495 s.NextToken = &v 4496 return s 4497} 4498 4499type ListServicesOutput struct { 4500 _ struct{} `type:"structure"` 4501 4502 // If the response contains NextToken, submit another ListServices request to 4503 // get the next group of results. Specify the value of NextToken from the previous 4504 // response in the next request. 4505 // 4506 // AWS Cloud Map gets MaxResults services and then filters them based on the 4507 // specified criteria. It's possible that no services in the first MaxResults 4508 // services matched the specified criteria but that subsequent groups of MaxResults 4509 // services do contain services that match the criteria. 4510 NextToken *string `type:"string"` 4511 4512 // An array that contains one ServiceSummary object for each service that matches 4513 // the specified filter criteria. 4514 Services []*ServiceSummary `type:"list"` 4515} 4516 4517// String returns the string representation 4518func (s ListServicesOutput) String() string { 4519 return awsutil.Prettify(s) 4520} 4521 4522// GoString returns the string representation 4523func (s ListServicesOutput) GoString() string { 4524 return s.String() 4525} 4526 4527// SetNextToken sets the NextToken field's value. 4528func (s *ListServicesOutput) SetNextToken(v string) *ListServicesOutput { 4529 s.NextToken = &v 4530 return s 4531} 4532 4533// SetServices sets the Services field's value. 4534func (s *ListServicesOutput) SetServices(v []*ServiceSummary) *ListServicesOutput { 4535 s.Services = v 4536 return s 4537} 4538 4539// A complex type that contains information about a specified namespace. 4540type Namespace struct { 4541 _ struct{} `type:"structure"` 4542 4543 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace 4544 // when you create it. 4545 Arn *string `type:"string"` 4546 4547 // The date that the namespace was created, in Unix date/time format and Coordinated 4548 // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. 4549 // For example, the value 1516925490.087 represents Friday, January 26, 2018 4550 // 12:11:30.087 AM. 4551 CreateDate *time.Time `type:"timestamp"` 4552 4553 // A unique string that identifies the request and that allows failed requests 4554 // to be retried without the risk of executing an operation twice. 4555 CreatorRequestId *string `type:"string"` 4556 4557 // The description that you specify for the namespace when you create it. 4558 Description *string `type:"string"` 4559 4560 // The ID of a namespace. 4561 Id *string `type:"string"` 4562 4563 // The name of the namespace, such as example.com. 4564 Name *string `type:"string"` 4565 4566 // A complex type that contains information that's specific to the type of the 4567 // namespace. 4568 Properties *NamespaceProperties `type:"structure"` 4569 4570 // The number of services that are associated with the namespace. 4571 ServiceCount *int64 `type:"integer"` 4572 4573 // The type of the namespace. Valid values are DNS_PUBLIC and DNS_PRIVATE. 4574 Type *string `type:"string" enum:"NamespaceType"` 4575} 4576 4577// String returns the string representation 4578func (s Namespace) String() string { 4579 return awsutil.Prettify(s) 4580} 4581 4582// GoString returns the string representation 4583func (s Namespace) GoString() string { 4584 return s.String() 4585} 4586 4587// SetArn sets the Arn field's value. 4588func (s *Namespace) SetArn(v string) *Namespace { 4589 s.Arn = &v 4590 return s 4591} 4592 4593// SetCreateDate sets the CreateDate field's value. 4594func (s *Namespace) SetCreateDate(v time.Time) *Namespace { 4595 s.CreateDate = &v 4596 return s 4597} 4598 4599// SetCreatorRequestId sets the CreatorRequestId field's value. 4600func (s *Namespace) SetCreatorRequestId(v string) *Namespace { 4601 s.CreatorRequestId = &v 4602 return s 4603} 4604 4605// SetDescription sets the Description field's value. 4606func (s *Namespace) SetDescription(v string) *Namespace { 4607 s.Description = &v 4608 return s 4609} 4610 4611// SetId sets the Id field's value. 4612func (s *Namespace) SetId(v string) *Namespace { 4613 s.Id = &v 4614 return s 4615} 4616 4617// SetName sets the Name field's value. 4618func (s *Namespace) SetName(v string) *Namespace { 4619 s.Name = &v 4620 return s 4621} 4622 4623// SetProperties sets the Properties field's value. 4624func (s *Namespace) SetProperties(v *NamespaceProperties) *Namespace { 4625 s.Properties = v 4626 return s 4627} 4628 4629// SetServiceCount sets the ServiceCount field's value. 4630func (s *Namespace) SetServiceCount(v int64) *Namespace { 4631 s.ServiceCount = &v 4632 return s 4633} 4634 4635// SetType sets the Type field's value. 4636func (s *Namespace) SetType(v string) *Namespace { 4637 s.Type = &v 4638 return s 4639} 4640 4641// A complex type that identifies the namespaces that you want to list. You 4642// can choose to list public or private namespaces. 4643type NamespaceFilter struct { 4644 _ struct{} `type:"structure"` 4645 4646 // The operator that you want to use to determine whether ListNamespaces returns 4647 // a namespace. Valid values for condition include: 4648 // 4649 // * EQ: When you specify EQ for the condition, you can choose to list only 4650 // public namespaces or private namespaces, but not both. EQ is the default 4651 // condition and can be omitted. 4652 // 4653 // * IN: When you specify IN for the condition, you can choose to list public 4654 // namespaces, private namespaces, or both. 4655 // 4656 // * BETWEEN: Not applicable 4657 Condition *string `type:"string" enum:"FilterCondition"` 4658 4659 // Specify TYPE. 4660 // 4661 // Name is a required field 4662 Name *string `type:"string" required:"true" enum:"NamespaceFilterName"` 4663 4664 // If you specify EQ for Condition, specify either DNS_PUBLIC or DNS_PRIVATE. 4665 // 4666 // If you specify IN for Condition, you can specify DNS_PUBLIC, DNS_PRIVATE, 4667 // or both. 4668 // 4669 // Values is a required field 4670 Values []*string `type:"list" required:"true"` 4671} 4672 4673// String returns the string representation 4674func (s NamespaceFilter) String() string { 4675 return awsutil.Prettify(s) 4676} 4677 4678// GoString returns the string representation 4679func (s NamespaceFilter) GoString() string { 4680 return s.String() 4681} 4682 4683// Validate inspects the fields of the type to determine if they are valid. 4684func (s *NamespaceFilter) Validate() error { 4685 invalidParams := request.ErrInvalidParams{Context: "NamespaceFilter"} 4686 if s.Name == nil { 4687 invalidParams.Add(request.NewErrParamRequired("Name")) 4688 } 4689 if s.Values == nil { 4690 invalidParams.Add(request.NewErrParamRequired("Values")) 4691 } 4692 4693 if invalidParams.Len() > 0 { 4694 return invalidParams 4695 } 4696 return nil 4697} 4698 4699// SetCondition sets the Condition field's value. 4700func (s *NamespaceFilter) SetCondition(v string) *NamespaceFilter { 4701 s.Condition = &v 4702 return s 4703} 4704 4705// SetName sets the Name field's value. 4706func (s *NamespaceFilter) SetName(v string) *NamespaceFilter { 4707 s.Name = &v 4708 return s 4709} 4710 4711// SetValues sets the Values field's value. 4712func (s *NamespaceFilter) SetValues(v []*string) *NamespaceFilter { 4713 s.Values = v 4714 return s 4715} 4716 4717// A complex type that contains information that is specific to the namespace 4718// type. 4719type NamespaceProperties struct { 4720 _ struct{} `type:"structure"` 4721 4722 // A complex type that contains the ID for the Route 53 hosted zone that AWS 4723 // Cloud Map creates when you create a namespace. 4724 DnsProperties *DnsProperties `type:"structure"` 4725 4726 // A complex type that contains the name of an HTTP namespace. 4727 HttpProperties *HttpProperties `type:"structure"` 4728} 4729 4730// String returns the string representation 4731func (s NamespaceProperties) String() string { 4732 return awsutil.Prettify(s) 4733} 4734 4735// GoString returns the string representation 4736func (s NamespaceProperties) GoString() string { 4737 return s.String() 4738} 4739 4740// SetDnsProperties sets the DnsProperties field's value. 4741func (s *NamespaceProperties) SetDnsProperties(v *DnsProperties) *NamespaceProperties { 4742 s.DnsProperties = v 4743 return s 4744} 4745 4746// SetHttpProperties sets the HttpProperties field's value. 4747func (s *NamespaceProperties) SetHttpProperties(v *HttpProperties) *NamespaceProperties { 4748 s.HttpProperties = v 4749 return s 4750} 4751 4752// A complex type that contains information about a namespace. 4753type NamespaceSummary struct { 4754 _ struct{} `type:"structure"` 4755 4756 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the namespace 4757 // when you create it. 4758 Arn *string `type:"string"` 4759 4760 // The date and time that the namespace was created. 4761 CreateDate *time.Time `type:"timestamp"` 4762 4763 // A description for the namespace. 4764 Description *string `type:"string"` 4765 4766 // The ID of the namespace. 4767 Id *string `type:"string"` 4768 4769 // The name of the namespace. When you create a namespace, AWS Cloud Map automatically 4770 // creates a Route 53 hosted zone that has the same name as the namespace. 4771 Name *string `type:"string"` 4772 4773 // A complex type that contains information that is specific to the namespace 4774 // type. 4775 Properties *NamespaceProperties `type:"structure"` 4776 4777 // The number of services that were created using the namespace. 4778 ServiceCount *int64 `type:"integer"` 4779 4780 // The type of the namespace, either public or private. 4781 Type *string `type:"string" enum:"NamespaceType"` 4782} 4783 4784// String returns the string representation 4785func (s NamespaceSummary) String() string { 4786 return awsutil.Prettify(s) 4787} 4788 4789// GoString returns the string representation 4790func (s NamespaceSummary) GoString() string { 4791 return s.String() 4792} 4793 4794// SetArn sets the Arn field's value. 4795func (s *NamespaceSummary) SetArn(v string) *NamespaceSummary { 4796 s.Arn = &v 4797 return s 4798} 4799 4800// SetCreateDate sets the CreateDate field's value. 4801func (s *NamespaceSummary) SetCreateDate(v time.Time) *NamespaceSummary { 4802 s.CreateDate = &v 4803 return s 4804} 4805 4806// SetDescription sets the Description field's value. 4807func (s *NamespaceSummary) SetDescription(v string) *NamespaceSummary { 4808 s.Description = &v 4809 return s 4810} 4811 4812// SetId sets the Id field's value. 4813func (s *NamespaceSummary) SetId(v string) *NamespaceSummary { 4814 s.Id = &v 4815 return s 4816} 4817 4818// SetName sets the Name field's value. 4819func (s *NamespaceSummary) SetName(v string) *NamespaceSummary { 4820 s.Name = &v 4821 return s 4822} 4823 4824// SetProperties sets the Properties field's value. 4825func (s *NamespaceSummary) SetProperties(v *NamespaceProperties) *NamespaceSummary { 4826 s.Properties = v 4827 return s 4828} 4829 4830// SetServiceCount sets the ServiceCount field's value. 4831func (s *NamespaceSummary) SetServiceCount(v int64) *NamespaceSummary { 4832 s.ServiceCount = &v 4833 return s 4834} 4835 4836// SetType sets the Type field's value. 4837func (s *NamespaceSummary) SetType(v string) *NamespaceSummary { 4838 s.Type = &v 4839 return s 4840} 4841 4842// A complex type that contains information about a specified operation. 4843type Operation struct { 4844 _ struct{} `type:"structure"` 4845 4846 // The date and time that the request was submitted, in Unix date/time format 4847 // and Coordinated Universal Time (UTC). The value of CreateDate is accurate 4848 // to milliseconds. For example, the value 1516925490.087 represents Friday, 4849 // January 26, 2018 12:11:30.087 AM. 4850 CreateDate *time.Time `type:"timestamp"` 4851 4852 // The code associated with ErrorMessage. Values for ErrorCode include the following: 4853 // 4854 // * ACCESS_DENIED 4855 // 4856 // * CANNOT_CREATE_HOSTED_ZONE 4857 // 4858 // * EXPIRED_TOKEN 4859 // 4860 // * HOSTED_ZONE_NOT_FOUND 4861 // 4862 // * INTERNAL_FAILURE 4863 // 4864 // * INVALID_CHANGE_BATCH 4865 // 4866 // * THROTTLED_REQUEST 4867 ErrorCode *string `type:"string"` 4868 4869 // If the value of Status is FAIL, the reason that the operation failed. 4870 ErrorMessage *string `type:"string"` 4871 4872 // The ID of the operation that you want to get information about. 4873 Id *string `type:"string"` 4874 4875 // The status of the operation. Values include the following: 4876 // 4877 // * SUBMITTED: This is the initial state immediately after you submit a 4878 // request. 4879 // 4880 // * PENDING: AWS Cloud Map is performing the operation. 4881 // 4882 // * SUCCESS: The operation succeeded. 4883 // 4884 // * FAIL: The operation failed. For the failure reason, see ErrorMessage. 4885 Status *string `type:"string" enum:"OperationStatus"` 4886 4887 // The name of the target entity that is associated with the operation: 4888 // 4889 // * NAMESPACE: The namespace ID is returned in the ResourceId property. 4890 // 4891 // * SERVICE: The service ID is returned in the ResourceId property. 4892 // 4893 // * INSTANCE: The instance ID is returned in the ResourceId property. 4894 Targets map[string]*string `type:"map"` 4895 4896 // The name of the operation that is associated with the specified ID. 4897 Type *string `type:"string" enum:"OperationType"` 4898 4899 // The date and time that the value of Status changed to the current value, 4900 // in Unix date/time format and Coordinated Universal Time (UTC). The value 4901 // of UpdateDate is accurate to milliseconds. For example, the value 1516925490.087 4902 // represents Friday, January 26, 2018 12:11:30.087 AM. 4903 UpdateDate *time.Time `type:"timestamp"` 4904} 4905 4906// String returns the string representation 4907func (s Operation) String() string { 4908 return awsutil.Prettify(s) 4909} 4910 4911// GoString returns the string representation 4912func (s Operation) GoString() string { 4913 return s.String() 4914} 4915 4916// SetCreateDate sets the CreateDate field's value. 4917func (s *Operation) SetCreateDate(v time.Time) *Operation { 4918 s.CreateDate = &v 4919 return s 4920} 4921 4922// SetErrorCode sets the ErrorCode field's value. 4923func (s *Operation) SetErrorCode(v string) *Operation { 4924 s.ErrorCode = &v 4925 return s 4926} 4927 4928// SetErrorMessage sets the ErrorMessage field's value. 4929func (s *Operation) SetErrorMessage(v string) *Operation { 4930 s.ErrorMessage = &v 4931 return s 4932} 4933 4934// SetId sets the Id field's value. 4935func (s *Operation) SetId(v string) *Operation { 4936 s.Id = &v 4937 return s 4938} 4939 4940// SetStatus sets the Status field's value. 4941func (s *Operation) SetStatus(v string) *Operation { 4942 s.Status = &v 4943 return s 4944} 4945 4946// SetTargets sets the Targets field's value. 4947func (s *Operation) SetTargets(v map[string]*string) *Operation { 4948 s.Targets = v 4949 return s 4950} 4951 4952// SetType sets the Type field's value. 4953func (s *Operation) SetType(v string) *Operation { 4954 s.Type = &v 4955 return s 4956} 4957 4958// SetUpdateDate sets the UpdateDate field's value. 4959func (s *Operation) SetUpdateDate(v time.Time) *Operation { 4960 s.UpdateDate = &v 4961 return s 4962} 4963 4964// A complex type that lets you select the operations that you want to list. 4965type OperationFilter struct { 4966 _ struct{} `type:"structure"` 4967 4968 // The operator that you want to use to determine whether an operation matches 4969 // the specified value. Valid values for condition include: 4970 // 4971 // * EQ: When you specify EQ for the condition, you can specify only one 4972 // value. EQ is supported for NAMESPACE_ID, SERVICE_ID, STATUS, and TYPE. 4973 // EQ is the default condition and can be omitted. 4974 // 4975 // * IN: When you specify IN for the condition, you can specify a list of 4976 // one or more values. IN is supported for STATUS and TYPE. An operation 4977 // must match one of the specified values to be returned in the response. 4978 // 4979 // * BETWEEN: Specify a start date and an end date in Unix date/time format 4980 // and Coordinated Universal Time (UTC). The start date must be the first 4981 // value. BETWEEN is supported for UPDATE_DATE. 4982 Condition *string `type:"string" enum:"FilterCondition"` 4983 4984 // Specify the operations that you want to get: 4985 // 4986 // * NAMESPACE_ID: Gets operations related to specified namespaces. 4987 // 4988 // * SERVICE_ID: Gets operations related to specified services. 4989 // 4990 // * STATUS: Gets operations based on the status of the operations: SUBMITTED, 4991 // PENDING, SUCCEED, or FAIL. 4992 // 4993 // * TYPE: Gets specified types of operation. 4994 // 4995 // * UPDATE_DATE: Gets operations that changed status during a specified 4996 // date/time range. 4997 // 4998 // Name is a required field 4999 Name *string `type:"string" required:"true" enum:"OperationFilterName"` 5000 5001 // Specify values that are applicable to the value that you specify for Name: 5002 // 5003 // * NAMESPACE_ID: Specify one namespace ID. 5004 // 5005 // * SERVICE_ID: Specify one service ID. 5006 // 5007 // * STATUS: Specify one or more statuses: SUBMITTED, PENDING, SUCCEED, or 5008 // FAIL. 5009 // 5010 // * TYPE: Specify one or more of the following types: CREATE_NAMESPACE, 5011 // DELETE_NAMESPACE, UPDATE_SERVICE, REGISTER_INSTANCE, or DEREGISTER_INSTANCE. 5012 // 5013 // * UPDATE_DATE: Specify a start date and an end date in Unix date/time 5014 // format and Coordinated Universal Time (UTC). The start date must be the 5015 // first value. 5016 // 5017 // Values is a required field 5018 Values []*string `type:"list" required:"true"` 5019} 5020 5021// String returns the string representation 5022func (s OperationFilter) String() string { 5023 return awsutil.Prettify(s) 5024} 5025 5026// GoString returns the string representation 5027func (s OperationFilter) GoString() string { 5028 return s.String() 5029} 5030 5031// Validate inspects the fields of the type to determine if they are valid. 5032func (s *OperationFilter) Validate() error { 5033 invalidParams := request.ErrInvalidParams{Context: "OperationFilter"} 5034 if s.Name == nil { 5035 invalidParams.Add(request.NewErrParamRequired("Name")) 5036 } 5037 if s.Values == nil { 5038 invalidParams.Add(request.NewErrParamRequired("Values")) 5039 } 5040 5041 if invalidParams.Len() > 0 { 5042 return invalidParams 5043 } 5044 return nil 5045} 5046 5047// SetCondition sets the Condition field's value. 5048func (s *OperationFilter) SetCondition(v string) *OperationFilter { 5049 s.Condition = &v 5050 return s 5051} 5052 5053// SetName sets the Name field's value. 5054func (s *OperationFilter) SetName(v string) *OperationFilter { 5055 s.Name = &v 5056 return s 5057} 5058 5059// SetValues sets the Values field's value. 5060func (s *OperationFilter) SetValues(v []*string) *OperationFilter { 5061 s.Values = v 5062 return s 5063} 5064 5065// A complex type that contains information about an operation that matches 5066// the criteria that you specified in a ListOperations request. 5067type OperationSummary struct { 5068 _ struct{} `type:"structure"` 5069 5070 // The ID for an operation. 5071 Id *string `type:"string"` 5072 5073 // The status of the operation. Values include the following: 5074 // 5075 // * SUBMITTED: This is the initial state immediately after you submit a 5076 // request. 5077 // 5078 // * PENDING: AWS Cloud Map is performing the operation. 5079 // 5080 // * SUCCESS: The operation succeeded. 5081 // 5082 // * FAIL: The operation failed. For the failure reason, see ErrorMessage. 5083 Status *string `type:"string" enum:"OperationStatus"` 5084} 5085 5086// String returns the string representation 5087func (s OperationSummary) String() string { 5088 return awsutil.Prettify(s) 5089} 5090 5091// GoString returns the string representation 5092func (s OperationSummary) GoString() string { 5093 return s.String() 5094} 5095 5096// SetId sets the Id field's value. 5097func (s *OperationSummary) SetId(v string) *OperationSummary { 5098 s.Id = &v 5099 return s 5100} 5101 5102// SetStatus sets the Status field's value. 5103func (s *OperationSummary) SetStatus(v string) *OperationSummary { 5104 s.Status = &v 5105 return s 5106} 5107 5108type RegisterInstanceInput struct { 5109 _ struct{} `type:"structure"` 5110 5111 // A string map that contains the following information for the service that 5112 // you specify in ServiceId: 5113 // 5114 // * The attributes that apply to the records that are defined in the service. 5115 // 5116 // * For each attribute, the applicable value. 5117 // 5118 // Supported attribute keys include the following: 5119 // 5120 // AWS_ALIAS_DNS_NAME 5121 // 5122 // If you want AWS Cloud Map to create an Amazon Route 53 alias record that 5123 // routes traffic to an Elastic Load Balancing load balancer, specify the DNS 5124 // name that is associated with the load balancer. For information about how 5125 // to get the DNS name, see "DNSName" in the topic AliasTarget (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html) 5126 // in the Route 53 API Reference. 5127 // 5128 // Note the following: 5129 // 5130 // * The configuration for the service that is specified by ServiceId must 5131 // include settings for an A record, an AAAA record, or both. 5132 // 5133 // * In the service that is specified by ServiceId, the value of RoutingPolicy 5134 // must be WEIGHTED. 5135 // 5136 // * If the service that is specified by ServiceId includes HealthCheckConfig 5137 // settings, AWS Cloud Map will create the Route 53 health check, but it 5138 // won't associate the health check with the alias record. 5139 // 5140 // * Auto naming currently doesn't support creating alias records that route 5141 // traffic to AWS resources other than ELB load balancers. 5142 // 5143 // * If you specify a value for AWS_ALIAS_DNS_NAME, don't specify values 5144 // for any of the AWS_INSTANCE attributes. 5145 // 5146 // AWS_INIT_HEALTH_STATUS 5147 // 5148 // If the service configuration includes HealthCheckCustomConfig, you can optionally 5149 // use AWS_INIT_HEALTH_STATUS to specify the initial status of the custom health 5150 // check, HEALTHY or UNHEALTHY. If you don't specify a value for AWS_INIT_HEALTH_STATUS, 5151 // the initial status is HEALTHY. 5152 // 5153 // AWS_INSTANCE_CNAME 5154 // 5155 // If the service configuration includes a CNAME record, the domain name that 5156 // you want Route 53 to return in response to DNS queries, for example, example.com. 5157 // 5158 // This value is required if the service specified by ServiceId includes settings 5159 // for an CNAME record. 5160 // 5161 // AWS_INSTANCE_IPV4 5162 // 5163 // If the service configuration includes an A record, the IPv4 address that 5164 // you want Route 53 to return in response to DNS queries, for example, 192.0.2.44. 5165 // 5166 // This value is required if the service specified by ServiceId includes settings 5167 // for an A record. If the service includes settings for an SRV record, you 5168 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 5169 // 5170 // AWS_INSTANCE_IPV6 5171 // 5172 // If the service configuration includes an AAAA record, the IPv6 address that 5173 // you want Route 53 to return in response to DNS queries, for example, 2001:0db8:85a3:0000:0000:abcd:0001:2345. 5174 // 5175 // This value is required if the service specified by ServiceId includes settings 5176 // for an AAAA record. If the service includes settings for an SRV record, you 5177 // must specify a value for AWS_INSTANCE_IPV4, AWS_INSTANCE_IPV6, or both. 5178 // 5179 // AWS_INSTANCE_PORT 5180 // 5181 // If the service includes an SRV record, the value that you want Route 53 to 5182 // return for the port. 5183 // 5184 // If the service includes HealthCheckConfig, the port on the endpoint that 5185 // you want Route 53 to send requests to. 5186 // 5187 // This value is required if you specified settings for an SRV record when you 5188 // created the service. 5189 // 5190 // Custom attributes 5191 // 5192 // You can add up to 30 custom attributes. For each key-value pair, the maximum 5193 // length of the attribute name is 255 characters, and the maximum length of 5194 // the attribute value is 1,024 characters. 5195 // 5196 // Attributes is a required field 5197 Attributes map[string]*string `type:"map" required:"true"` 5198 5199 // A unique string that identifies the request and that allows failed RegisterInstance 5200 // requests to be retried without the risk of executing the operation twice. 5201 // You must use a unique CreatorRequestId string every time you submit a RegisterInstance 5202 // request if you're registering additional instances for the same namespace 5203 // and service. CreatorRequestId can be any unique string, for example, a date/time 5204 // stamp. 5205 CreatorRequestId *string `type:"string" idempotencyToken:"true"` 5206 5207 // An identifier that you want to associate with the instance. Note the following: 5208 // 5209 // * If the service that is specified by ServiceId includes settings for 5210 // an SRV record, the value of InstanceId is automatically included as part 5211 // of the value for the SRV record. For more information, see DnsRecord$Type. 5212 // 5213 // * You can use this value to update an existing instance. 5214 // 5215 // * To register a new instance, you must specify a value that is unique 5216 // among instances that you register by using the same service. 5217 // 5218 // * If you specify an existing InstanceId and ServiceId, AWS Cloud Map updates 5219 // the existing DNS records, if any. If there's also an existing health check, 5220 // AWS Cloud Map deletes the old health check and creates a new one. The 5221 // health check isn't deleted immediately, so it will still appear for a 5222 // while if you submit a ListHealthChecks request, for example. 5223 // 5224 // InstanceId is a required field 5225 InstanceId *string `type:"string" required:"true"` 5226 5227 // The ID of the service that you want to use for settings for the instance. 5228 // 5229 // ServiceId is a required field 5230 ServiceId *string `type:"string" required:"true"` 5231} 5232 5233// String returns the string representation 5234func (s RegisterInstanceInput) String() string { 5235 return awsutil.Prettify(s) 5236} 5237 5238// GoString returns the string representation 5239func (s RegisterInstanceInput) GoString() string { 5240 return s.String() 5241} 5242 5243// Validate inspects the fields of the type to determine if they are valid. 5244func (s *RegisterInstanceInput) Validate() error { 5245 invalidParams := request.ErrInvalidParams{Context: "RegisterInstanceInput"} 5246 if s.Attributes == nil { 5247 invalidParams.Add(request.NewErrParamRequired("Attributes")) 5248 } 5249 if s.InstanceId == nil { 5250 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 5251 } 5252 if s.ServiceId == nil { 5253 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 5254 } 5255 5256 if invalidParams.Len() > 0 { 5257 return invalidParams 5258 } 5259 return nil 5260} 5261 5262// SetAttributes sets the Attributes field's value. 5263func (s *RegisterInstanceInput) SetAttributes(v map[string]*string) *RegisterInstanceInput { 5264 s.Attributes = v 5265 return s 5266} 5267 5268// SetCreatorRequestId sets the CreatorRequestId field's value. 5269func (s *RegisterInstanceInput) SetCreatorRequestId(v string) *RegisterInstanceInput { 5270 s.CreatorRequestId = &v 5271 return s 5272} 5273 5274// SetInstanceId sets the InstanceId field's value. 5275func (s *RegisterInstanceInput) SetInstanceId(v string) *RegisterInstanceInput { 5276 s.InstanceId = &v 5277 return s 5278} 5279 5280// SetServiceId sets the ServiceId field's value. 5281func (s *RegisterInstanceInput) SetServiceId(v string) *RegisterInstanceInput { 5282 s.ServiceId = &v 5283 return s 5284} 5285 5286type RegisterInstanceOutput struct { 5287 _ struct{} `type:"structure"` 5288 5289 // A value that you can use to determine whether the request completed successfully. 5290 // To get the status of the operation, see GetOperation. 5291 OperationId *string `type:"string"` 5292} 5293 5294// String returns the string representation 5295func (s RegisterInstanceOutput) String() string { 5296 return awsutil.Prettify(s) 5297} 5298 5299// GoString returns the string representation 5300func (s RegisterInstanceOutput) GoString() string { 5301 return s.String() 5302} 5303 5304// SetOperationId sets the OperationId field's value. 5305func (s *RegisterInstanceOutput) SetOperationId(v string) *RegisterInstanceOutput { 5306 s.OperationId = &v 5307 return s 5308} 5309 5310// A complex type that contains information about the specified service. 5311type Service struct { 5312 _ struct{} `type:"structure"` 5313 5314 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service 5315 // when you create it. 5316 Arn *string `type:"string"` 5317 5318 // The date and time that the service was created, in Unix format and Coordinated 5319 // Universal Time (UTC). The value of CreateDate is accurate to milliseconds. 5320 // For example, the value 1516925490.087 represents Friday, January 26, 2018 5321 // 12:11:30.087 AM. 5322 CreateDate *time.Time `type:"timestamp"` 5323 5324 // A unique string that identifies the request and that allows failed requests 5325 // to be retried without the risk of executing the operation twice. CreatorRequestId 5326 // can be any unique string, for example, a date/time stamp. 5327 CreatorRequestId *string `type:"string"` 5328 5329 // The description of the service. 5330 Description *string `type:"string"` 5331 5332 // A complex type that contains information about the Route 53 DNS records that 5333 // you want AWS Cloud Map to create when you register an instance. 5334 DnsConfig *DnsConfig `type:"structure"` 5335 5336 // Public DNS namespaces only. A complex type that contains settings for an 5337 // optional health check. If you specify settings for a health check, AWS Cloud 5338 // Map associates the health check with the records that you specify in DnsConfig. 5339 // 5340 // For information about the charges for health checks, see Amazon Route 53 5341 // Pricing (http://aws.amazon.com/route53/pricing/). 5342 HealthCheckConfig *HealthCheckConfig `type:"structure"` 5343 5344 // A complex type that contains information about an optional custom health 5345 // check. 5346 // 5347 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 5348 // or HealthCheckConfig but not both. 5349 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 5350 5351 // The ID that AWS Cloud Map assigned to the service when you created it. 5352 Id *string `type:"string"` 5353 5354 // The number of instances that are currently associated with the service. Instances 5355 // that were previously associated with the service but that have been deleted 5356 // are not included in the count. 5357 InstanceCount *int64 `type:"integer"` 5358 5359 // The name of the service. 5360 Name *string `type:"string"` 5361 5362 // The ID of the namespace that was used to create the service. 5363 NamespaceId *string `type:"string"` 5364} 5365 5366// String returns the string representation 5367func (s Service) String() string { 5368 return awsutil.Prettify(s) 5369} 5370 5371// GoString returns the string representation 5372func (s Service) GoString() string { 5373 return s.String() 5374} 5375 5376// SetArn sets the Arn field's value. 5377func (s *Service) SetArn(v string) *Service { 5378 s.Arn = &v 5379 return s 5380} 5381 5382// SetCreateDate sets the CreateDate field's value. 5383func (s *Service) SetCreateDate(v time.Time) *Service { 5384 s.CreateDate = &v 5385 return s 5386} 5387 5388// SetCreatorRequestId sets the CreatorRequestId field's value. 5389func (s *Service) SetCreatorRequestId(v string) *Service { 5390 s.CreatorRequestId = &v 5391 return s 5392} 5393 5394// SetDescription sets the Description field's value. 5395func (s *Service) SetDescription(v string) *Service { 5396 s.Description = &v 5397 return s 5398} 5399 5400// SetDnsConfig sets the DnsConfig field's value. 5401func (s *Service) SetDnsConfig(v *DnsConfig) *Service { 5402 s.DnsConfig = v 5403 return s 5404} 5405 5406// SetHealthCheckConfig sets the HealthCheckConfig field's value. 5407func (s *Service) SetHealthCheckConfig(v *HealthCheckConfig) *Service { 5408 s.HealthCheckConfig = v 5409 return s 5410} 5411 5412// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 5413func (s *Service) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *Service { 5414 s.HealthCheckCustomConfig = v 5415 return s 5416} 5417 5418// SetId sets the Id field's value. 5419func (s *Service) SetId(v string) *Service { 5420 s.Id = &v 5421 return s 5422} 5423 5424// SetInstanceCount sets the InstanceCount field's value. 5425func (s *Service) SetInstanceCount(v int64) *Service { 5426 s.InstanceCount = &v 5427 return s 5428} 5429 5430// SetName sets the Name field's value. 5431func (s *Service) SetName(v string) *Service { 5432 s.Name = &v 5433 return s 5434} 5435 5436// SetNamespaceId sets the NamespaceId field's value. 5437func (s *Service) SetNamespaceId(v string) *Service { 5438 s.NamespaceId = &v 5439 return s 5440} 5441 5442// A complex type that contains changes to an existing service. 5443type ServiceChange struct { 5444 _ struct{} `type:"structure"` 5445 5446 // A description for the service. 5447 Description *string `type:"string"` 5448 5449 // A complex type that contains information about the Route 53 DNS records that 5450 // you want AWS Cloud Map to create when you register an instance. 5451 // 5452 // DnsConfig is a required field 5453 DnsConfig *DnsConfigChange `type:"structure" required:"true"` 5454 5455 // Public DNS namespaces only. A complex type that contains settings for an 5456 // optional health check. If you specify settings for a health check, AWS Cloud 5457 // Map associates the health check with the records that you specify in DnsConfig. 5458 // 5459 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 5460 // or HealthCheckConfig but not both. 5461 // 5462 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 5463 // For information about pricing for health checks, see Amazon Route 53 Pricing 5464 // (http://aws.amazon.com/route53/pricing/). 5465 // 5466 // Note the following about configuring health checks. 5467 // 5468 // A and AAAA records 5469 // 5470 // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 5471 // Map creates a health check that uses the IPv4 address to check the health 5472 // of the resource. If the endpoint that is specified by the IPv4 address is 5473 // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 5474 // 5475 // CNAME records 5476 // 5477 // You can't specify settings for HealthCheckConfig when the DNSConfig includes 5478 // CNAME for the value of Type. If you do, the CreateService request will fail 5479 // with an InvalidInput error. 5480 // 5481 // Request interval 5482 // 5483 // A Route 53 health checker in each health-checking region sends a health check 5484 // request to an endpoint every 30 seconds. On average, your endpoint receives 5485 // a health check request about every two seconds. However, health checkers 5486 // don't coordinate with one another, so you'll sometimes see several requests 5487 // per second followed by a few seconds with no health checks at all. 5488 // 5489 // Health checking regions 5490 // 5491 // Health checkers perform checks from all Route 53 health-checking regions. 5492 // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 5493 // 5494 // Alias records 5495 // 5496 // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 5497 // AWS Cloud Map creates a Route 53 alias record. Note the following: 5498 // 5499 // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 5500 // When EvaluateTargetHealth is true, the alias record inherits the health 5501 // of the referenced AWS resource. such as an ELB load balancer. For more 5502 // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 5503 // 5504 // * If you include HealthCheckConfig and then use the service to register 5505 // an instance that creates an alias record, Route 53 doesn't create the 5506 // health check. 5507 // 5508 // Charges for health checks 5509 // 5510 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 5511 // For information about pricing for health checks, see Amazon Route 53 Pricing 5512 // (http://aws.amazon.com/route53/pricing/). 5513 HealthCheckConfig *HealthCheckConfig `type:"structure"` 5514} 5515 5516// String returns the string representation 5517func (s ServiceChange) String() string { 5518 return awsutil.Prettify(s) 5519} 5520 5521// GoString returns the string representation 5522func (s ServiceChange) GoString() string { 5523 return s.String() 5524} 5525 5526// Validate inspects the fields of the type to determine if they are valid. 5527func (s *ServiceChange) Validate() error { 5528 invalidParams := request.ErrInvalidParams{Context: "ServiceChange"} 5529 if s.DnsConfig == nil { 5530 invalidParams.Add(request.NewErrParamRequired("DnsConfig")) 5531 } 5532 if s.DnsConfig != nil { 5533 if err := s.DnsConfig.Validate(); err != nil { 5534 invalidParams.AddNested("DnsConfig", err.(request.ErrInvalidParams)) 5535 } 5536 } 5537 if s.HealthCheckConfig != nil { 5538 if err := s.HealthCheckConfig.Validate(); err != nil { 5539 invalidParams.AddNested("HealthCheckConfig", err.(request.ErrInvalidParams)) 5540 } 5541 } 5542 5543 if invalidParams.Len() > 0 { 5544 return invalidParams 5545 } 5546 return nil 5547} 5548 5549// SetDescription sets the Description field's value. 5550func (s *ServiceChange) SetDescription(v string) *ServiceChange { 5551 s.Description = &v 5552 return s 5553} 5554 5555// SetDnsConfig sets the DnsConfig field's value. 5556func (s *ServiceChange) SetDnsConfig(v *DnsConfigChange) *ServiceChange { 5557 s.DnsConfig = v 5558 return s 5559} 5560 5561// SetHealthCheckConfig sets the HealthCheckConfig field's value. 5562func (s *ServiceChange) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceChange { 5563 s.HealthCheckConfig = v 5564 return s 5565} 5566 5567// A complex type that lets you specify the namespaces that you want to list 5568// services for. 5569type ServiceFilter struct { 5570 _ struct{} `type:"structure"` 5571 5572 // The operator that you want to use to determine whether a service is returned 5573 // by ListServices. Valid values for Condition include the following: 5574 // 5575 // * EQ: When you specify EQ, specify one namespace ID for Values. EQ is 5576 // the default condition and can be omitted. 5577 // 5578 // * IN: When you specify IN, specify a list of the IDs for the namespaces 5579 // that you want ListServices to return a list of services for. 5580 // 5581 // * BETWEEN: Not applicable. 5582 Condition *string `type:"string" enum:"FilterCondition"` 5583 5584 // Specify NAMESPACE_ID. 5585 // 5586 // Name is a required field 5587 Name *string `type:"string" required:"true" enum:"ServiceFilterName"` 5588 5589 // The values that are applicable to the value that you specify for Condition 5590 // to filter the list of services. 5591 // 5592 // Values is a required field 5593 Values []*string `type:"list" required:"true"` 5594} 5595 5596// String returns the string representation 5597func (s ServiceFilter) String() string { 5598 return awsutil.Prettify(s) 5599} 5600 5601// GoString returns the string representation 5602func (s ServiceFilter) GoString() string { 5603 return s.String() 5604} 5605 5606// Validate inspects the fields of the type to determine if they are valid. 5607func (s *ServiceFilter) Validate() error { 5608 invalidParams := request.ErrInvalidParams{Context: "ServiceFilter"} 5609 if s.Name == nil { 5610 invalidParams.Add(request.NewErrParamRequired("Name")) 5611 } 5612 if s.Values == nil { 5613 invalidParams.Add(request.NewErrParamRequired("Values")) 5614 } 5615 5616 if invalidParams.Len() > 0 { 5617 return invalidParams 5618 } 5619 return nil 5620} 5621 5622// SetCondition sets the Condition field's value. 5623func (s *ServiceFilter) SetCondition(v string) *ServiceFilter { 5624 s.Condition = &v 5625 return s 5626} 5627 5628// SetName sets the Name field's value. 5629func (s *ServiceFilter) SetName(v string) *ServiceFilter { 5630 s.Name = &v 5631 return s 5632} 5633 5634// SetValues sets the Values field's value. 5635func (s *ServiceFilter) SetValues(v []*string) *ServiceFilter { 5636 s.Values = v 5637 return s 5638} 5639 5640// A complex type that contains information about a specified service. 5641type ServiceSummary struct { 5642 _ struct{} `type:"structure"` 5643 5644 // The Amazon Resource Name (ARN) that AWS Cloud Map assigns to the service 5645 // when you create it. 5646 Arn *string `type:"string"` 5647 5648 // The date and time that the service was created. 5649 CreateDate *time.Time `type:"timestamp"` 5650 5651 // The description that you specify when you create the service. 5652 Description *string `type:"string"` 5653 5654 // A complex type that contains information about the Amazon Route 53 DNS records 5655 // that you want AWS Cloud Map to create when you register an instance. 5656 DnsConfig *DnsConfig `type:"structure"` 5657 5658 // Public DNS namespaces only. A complex type that contains settings for an 5659 // optional health check. If you specify settings for a health check, AWS Cloud 5660 // Map associates the health check with the records that you specify in DnsConfig. 5661 // 5662 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 5663 // or HealthCheckConfig but not both. 5664 // 5665 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 5666 // For information about pricing for health checks, see Amazon Route 53 Pricing 5667 // (http://aws.amazon.com/route53/pricing/). 5668 // 5669 // Note the following about configuring health checks. 5670 // 5671 // A and AAAA records 5672 // 5673 // If DnsConfig includes configurations for both A and AAAA records, AWS Cloud 5674 // Map creates a health check that uses the IPv4 address to check the health 5675 // of the resource. If the endpoint that is specified by the IPv4 address is 5676 // unhealthy, Route 53 considers both the A and AAAA records to be unhealthy. 5677 // 5678 // CNAME records 5679 // 5680 // You can't specify settings for HealthCheckConfig when the DNSConfig includes 5681 // CNAME for the value of Type. If you do, the CreateService request will fail 5682 // with an InvalidInput error. 5683 // 5684 // Request interval 5685 // 5686 // A Route 53 health checker in each health-checking region sends a health check 5687 // request to an endpoint every 30 seconds. On average, your endpoint receives 5688 // a health check request about every two seconds. However, health checkers 5689 // don't coordinate with one another, so you'll sometimes see several requests 5690 // per second followed by a few seconds with no health checks at all. 5691 // 5692 // Health checking regions 5693 // 5694 // Health checkers perform checks from all Route 53 health-checking regions. 5695 // For a list of the current regions, see Regions (http://docs.aws.amazon.com/Route53/latest/APIReference/API_HealthCheckConfig.html#Route53-Type-HealthCheckConfig-Regions). 5696 // 5697 // Alias records 5698 // 5699 // When you register an instance, if you include the AWS_ALIAS_DNS_NAME attribute, 5700 // AWS Cloud Map creates a Route 53 alias record. Note the following: 5701 // 5702 // * Route 53 automatically sets EvaluateTargetHealth to true for alias records. 5703 // When EvaluateTargetHealth is true, the alias record inherits the health 5704 // of the referenced AWS resource. such as an ELB load balancer. For more 5705 // information, see EvaluateTargetHealth (http://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-EvaluateTargetHealth). 5706 // 5707 // * If you include HealthCheckConfig and then use the service to register 5708 // an instance that creates an alias record, Route 53 doesn't create the 5709 // health check. 5710 // 5711 // Charges for health checks 5712 // 5713 // Health checks are basic Route 53 health checks that monitor an AWS endpoint. 5714 // For information about pricing for health checks, see Amazon Route 53 Pricing 5715 // (http://aws.amazon.com/route53/pricing/). 5716 HealthCheckConfig *HealthCheckConfig `type:"structure"` 5717 5718 // A complex type that contains information about an optional custom health 5719 // check. A custom health check, which requires that you use a third-party health 5720 // checker to evaluate the health of your resources, is useful in the following 5721 // circumstances: 5722 // 5723 // * You can't use a health check that is defined by HealthCheckConfig because 5724 // the resource isn't available over the internet. For example, you can use 5725 // a custom health check when the instance is in an Amazon VPC. (To check 5726 // the health of resources in a VPC, the health checker must also be in the 5727 // VPC.) 5728 // 5729 // * You want to use a third-party health checker regardless of where your 5730 // resources are. 5731 // 5732 // If you specify a health check configuration, you can specify either HealthCheckCustomConfig 5733 // or HealthCheckConfig but not both. 5734 // 5735 // To change the status of a custom health check, submit an UpdateInstanceCustomHealthStatus 5736 // request. Cloud Map doesn't monitor the status of the resource, it just keeps 5737 // a record of the status specified in the most recent UpdateInstanceCustomHealthStatus 5738 // request. 5739 // 5740 // Here's how custom health checks work: 5741 // 5742 // You create a service and specify a value for FailureThreshold. 5743 // 5744 // The failure threshold indicates the number of 30-second intervals you want 5745 // AWS Cloud Map to wait between the time that your application sends an UpdateInstanceCustomHealthStatus 5746 // request and the time that AWS Cloud Map stops routing internet traffic to 5747 // the corresponding resource. 5748 // 5749 // You register an instance. 5750 // 5751 // You configure a third-party health checker to monitor the resource that is 5752 // associated with the new instance. 5753 // 5754 // AWS Cloud Map doesn't check the health of the resource directly. 5755 // 5756 // The third-party health-checker determines that the resource is unhealthy 5757 // and notifies your application. 5758 // 5759 // Your application submits an UpdateInstanceCustomHealthStatus request. 5760 // 5761 // AWS Cloud Map waits for (FailureThreshold x 30) seconds. 5762 // 5763 // If another UpdateInstanceCustomHealthStatus request doesn't arrive during 5764 // that time to change the status back to healthy, AWS Cloud Map stops routing 5765 // traffic to the resource. 5766 // 5767 // Note the following about configuring custom health checks. 5768 HealthCheckCustomConfig *HealthCheckCustomConfig `type:"structure"` 5769 5770 // The ID that AWS Cloud Map assigned to the service when you created it. 5771 Id *string `type:"string"` 5772 5773 // The number of instances that are currently associated with the service. Instances 5774 // that were previously associated with the service but that have been deleted 5775 // are not included in the count. 5776 InstanceCount *int64 `type:"integer"` 5777 5778 // The name of the service. 5779 Name *string `type:"string"` 5780} 5781 5782// String returns the string representation 5783func (s ServiceSummary) String() string { 5784 return awsutil.Prettify(s) 5785} 5786 5787// GoString returns the string representation 5788func (s ServiceSummary) GoString() string { 5789 return s.String() 5790} 5791 5792// SetArn sets the Arn field's value. 5793func (s *ServiceSummary) SetArn(v string) *ServiceSummary { 5794 s.Arn = &v 5795 return s 5796} 5797 5798// SetCreateDate sets the CreateDate field's value. 5799func (s *ServiceSummary) SetCreateDate(v time.Time) *ServiceSummary { 5800 s.CreateDate = &v 5801 return s 5802} 5803 5804// SetDescription sets the Description field's value. 5805func (s *ServiceSummary) SetDescription(v string) *ServiceSummary { 5806 s.Description = &v 5807 return s 5808} 5809 5810// SetDnsConfig sets the DnsConfig field's value. 5811func (s *ServiceSummary) SetDnsConfig(v *DnsConfig) *ServiceSummary { 5812 s.DnsConfig = v 5813 return s 5814} 5815 5816// SetHealthCheckConfig sets the HealthCheckConfig field's value. 5817func (s *ServiceSummary) SetHealthCheckConfig(v *HealthCheckConfig) *ServiceSummary { 5818 s.HealthCheckConfig = v 5819 return s 5820} 5821 5822// SetHealthCheckCustomConfig sets the HealthCheckCustomConfig field's value. 5823func (s *ServiceSummary) SetHealthCheckCustomConfig(v *HealthCheckCustomConfig) *ServiceSummary { 5824 s.HealthCheckCustomConfig = v 5825 return s 5826} 5827 5828// SetId sets the Id field's value. 5829func (s *ServiceSummary) SetId(v string) *ServiceSummary { 5830 s.Id = &v 5831 return s 5832} 5833 5834// SetInstanceCount sets the InstanceCount field's value. 5835func (s *ServiceSummary) SetInstanceCount(v int64) *ServiceSummary { 5836 s.InstanceCount = &v 5837 return s 5838} 5839 5840// SetName sets the Name field's value. 5841func (s *ServiceSummary) SetName(v string) *ServiceSummary { 5842 s.Name = &v 5843 return s 5844} 5845 5846type UpdateInstanceCustomHealthStatusInput struct { 5847 _ struct{} `type:"structure"` 5848 5849 // The ID of the instance that you want to change the health status for. 5850 // 5851 // InstanceId is a required field 5852 InstanceId *string `type:"string" required:"true"` 5853 5854 // The ID of the service that includes the configuration for the custom health 5855 // check that you want to change the status for. 5856 // 5857 // ServiceId is a required field 5858 ServiceId *string `type:"string" required:"true"` 5859 5860 // The new status of the instance, HEALTHY or UNHEALTHY. 5861 // 5862 // Status is a required field 5863 Status *string `type:"string" required:"true" enum:"CustomHealthStatus"` 5864} 5865 5866// String returns the string representation 5867func (s UpdateInstanceCustomHealthStatusInput) String() string { 5868 return awsutil.Prettify(s) 5869} 5870 5871// GoString returns the string representation 5872func (s UpdateInstanceCustomHealthStatusInput) GoString() string { 5873 return s.String() 5874} 5875 5876// Validate inspects the fields of the type to determine if they are valid. 5877func (s *UpdateInstanceCustomHealthStatusInput) Validate() error { 5878 invalidParams := request.ErrInvalidParams{Context: "UpdateInstanceCustomHealthStatusInput"} 5879 if s.InstanceId == nil { 5880 invalidParams.Add(request.NewErrParamRequired("InstanceId")) 5881 } 5882 if s.ServiceId == nil { 5883 invalidParams.Add(request.NewErrParamRequired("ServiceId")) 5884 } 5885 if s.Status == nil { 5886 invalidParams.Add(request.NewErrParamRequired("Status")) 5887 } 5888 5889 if invalidParams.Len() > 0 { 5890 return invalidParams 5891 } 5892 return nil 5893} 5894 5895// SetInstanceId sets the InstanceId field's value. 5896func (s *UpdateInstanceCustomHealthStatusInput) SetInstanceId(v string) *UpdateInstanceCustomHealthStatusInput { 5897 s.InstanceId = &v 5898 return s 5899} 5900 5901// SetServiceId sets the ServiceId field's value. 5902func (s *UpdateInstanceCustomHealthStatusInput) SetServiceId(v string) *UpdateInstanceCustomHealthStatusInput { 5903 s.ServiceId = &v 5904 return s 5905} 5906 5907// SetStatus sets the Status field's value. 5908func (s *UpdateInstanceCustomHealthStatusInput) SetStatus(v string) *UpdateInstanceCustomHealthStatusInput { 5909 s.Status = &v 5910 return s 5911} 5912 5913type UpdateInstanceCustomHealthStatusOutput struct { 5914 _ struct{} `type:"structure"` 5915} 5916 5917// String returns the string representation 5918func (s UpdateInstanceCustomHealthStatusOutput) String() string { 5919 return awsutil.Prettify(s) 5920} 5921 5922// GoString returns the string representation 5923func (s UpdateInstanceCustomHealthStatusOutput) GoString() string { 5924 return s.String() 5925} 5926 5927type UpdateServiceInput struct { 5928 _ struct{} `type:"structure"` 5929 5930 // The ID of the service that you want to update. 5931 // 5932 // Id is a required field 5933 Id *string `type:"string" required:"true"` 5934 5935 // A complex type that contains the new settings for the service. 5936 // 5937 // Service is a required field 5938 Service *ServiceChange `type:"structure" required:"true"` 5939} 5940 5941// String returns the string representation 5942func (s UpdateServiceInput) String() string { 5943 return awsutil.Prettify(s) 5944} 5945 5946// GoString returns the string representation 5947func (s UpdateServiceInput) GoString() string { 5948 return s.String() 5949} 5950 5951// Validate inspects the fields of the type to determine if they are valid. 5952func (s *UpdateServiceInput) Validate() error { 5953 invalidParams := request.ErrInvalidParams{Context: "UpdateServiceInput"} 5954 if s.Id == nil { 5955 invalidParams.Add(request.NewErrParamRequired("Id")) 5956 } 5957 if s.Service == nil { 5958 invalidParams.Add(request.NewErrParamRequired("Service")) 5959 } 5960 if s.Service != nil { 5961 if err := s.Service.Validate(); err != nil { 5962 invalidParams.AddNested("Service", err.(request.ErrInvalidParams)) 5963 } 5964 } 5965 5966 if invalidParams.Len() > 0 { 5967 return invalidParams 5968 } 5969 return nil 5970} 5971 5972// SetId sets the Id field's value. 5973func (s *UpdateServiceInput) SetId(v string) *UpdateServiceInput { 5974 s.Id = &v 5975 return s 5976} 5977 5978// SetService sets the Service field's value. 5979func (s *UpdateServiceInput) SetService(v *ServiceChange) *UpdateServiceInput { 5980 s.Service = v 5981 return s 5982} 5983 5984type UpdateServiceOutput struct { 5985 _ struct{} `type:"structure"` 5986 5987 // A value that you can use to determine whether the request completed successfully. 5988 // To get the status of the operation, see GetOperation. 5989 OperationId *string `type:"string"` 5990} 5991 5992// String returns the string representation 5993func (s UpdateServiceOutput) String() string { 5994 return awsutil.Prettify(s) 5995} 5996 5997// GoString returns the string representation 5998func (s UpdateServiceOutput) GoString() string { 5999 return s.String() 6000} 6001 6002// SetOperationId sets the OperationId field's value. 6003func (s *UpdateServiceOutput) SetOperationId(v string) *UpdateServiceOutput { 6004 s.OperationId = &v 6005 return s 6006} 6007 6008const ( 6009 // CustomHealthStatusHealthy is a CustomHealthStatus enum value 6010 CustomHealthStatusHealthy = "HEALTHY" 6011 6012 // CustomHealthStatusUnhealthy is a CustomHealthStatus enum value 6013 CustomHealthStatusUnhealthy = "UNHEALTHY" 6014) 6015 6016const ( 6017 // FilterConditionEq is a FilterCondition enum value 6018 FilterConditionEq = "EQ" 6019 6020 // FilterConditionIn is a FilterCondition enum value 6021 FilterConditionIn = "IN" 6022 6023 // FilterConditionBetween is a FilterCondition enum value 6024 FilterConditionBetween = "BETWEEN" 6025) 6026 6027const ( 6028 // HealthCheckTypeHttp is a HealthCheckType enum value 6029 HealthCheckTypeHttp = "HTTP" 6030 6031 // HealthCheckTypeHttps is a HealthCheckType enum value 6032 HealthCheckTypeHttps = "HTTPS" 6033 6034 // HealthCheckTypeTcp is a HealthCheckType enum value 6035 HealthCheckTypeTcp = "TCP" 6036) 6037 6038const ( 6039 // HealthStatusHealthy is a HealthStatus enum value 6040 HealthStatusHealthy = "HEALTHY" 6041 6042 // HealthStatusUnhealthy is a HealthStatus enum value 6043 HealthStatusUnhealthy = "UNHEALTHY" 6044 6045 // HealthStatusUnknown is a HealthStatus enum value 6046 HealthStatusUnknown = "UNKNOWN" 6047) 6048 6049const ( 6050 // HealthStatusFilterHealthy is a HealthStatusFilter enum value 6051 HealthStatusFilterHealthy = "HEALTHY" 6052 6053 // HealthStatusFilterUnhealthy is a HealthStatusFilter enum value 6054 HealthStatusFilterUnhealthy = "UNHEALTHY" 6055 6056 // HealthStatusFilterAll is a HealthStatusFilter enum value 6057 HealthStatusFilterAll = "ALL" 6058) 6059 6060const ( 6061 // NamespaceFilterNameType is a NamespaceFilterName enum value 6062 NamespaceFilterNameType = "TYPE" 6063) 6064 6065const ( 6066 // NamespaceTypeDnsPublic is a NamespaceType enum value 6067 NamespaceTypeDnsPublic = "DNS_PUBLIC" 6068 6069 // NamespaceTypeDnsPrivate is a NamespaceType enum value 6070 NamespaceTypeDnsPrivate = "DNS_PRIVATE" 6071 6072 // NamespaceTypeHttp is a NamespaceType enum value 6073 NamespaceTypeHttp = "HTTP" 6074) 6075 6076const ( 6077 // OperationFilterNameNamespaceId is a OperationFilterName enum value 6078 OperationFilterNameNamespaceId = "NAMESPACE_ID" 6079 6080 // OperationFilterNameServiceId is a OperationFilterName enum value 6081 OperationFilterNameServiceId = "SERVICE_ID" 6082 6083 // OperationFilterNameStatus is a OperationFilterName enum value 6084 OperationFilterNameStatus = "STATUS" 6085 6086 // OperationFilterNameType is a OperationFilterName enum value 6087 OperationFilterNameType = "TYPE" 6088 6089 // OperationFilterNameUpdateDate is a OperationFilterName enum value 6090 OperationFilterNameUpdateDate = "UPDATE_DATE" 6091) 6092 6093const ( 6094 // OperationStatusSubmitted is a OperationStatus enum value 6095 OperationStatusSubmitted = "SUBMITTED" 6096 6097 // OperationStatusPending is a OperationStatus enum value 6098 OperationStatusPending = "PENDING" 6099 6100 // OperationStatusSuccess is a OperationStatus enum value 6101 OperationStatusSuccess = "SUCCESS" 6102 6103 // OperationStatusFail is a OperationStatus enum value 6104 OperationStatusFail = "FAIL" 6105) 6106 6107const ( 6108 // OperationTargetTypeNamespace is a OperationTargetType enum value 6109 OperationTargetTypeNamespace = "NAMESPACE" 6110 6111 // OperationTargetTypeService is a OperationTargetType enum value 6112 OperationTargetTypeService = "SERVICE" 6113 6114 // OperationTargetTypeInstance is a OperationTargetType enum value 6115 OperationTargetTypeInstance = "INSTANCE" 6116) 6117 6118const ( 6119 // OperationTypeCreateNamespace is a OperationType enum value 6120 OperationTypeCreateNamespace = "CREATE_NAMESPACE" 6121 6122 // OperationTypeDeleteNamespace is a OperationType enum value 6123 OperationTypeDeleteNamespace = "DELETE_NAMESPACE" 6124 6125 // OperationTypeUpdateService is a OperationType enum value 6126 OperationTypeUpdateService = "UPDATE_SERVICE" 6127 6128 // OperationTypeRegisterInstance is a OperationType enum value 6129 OperationTypeRegisterInstance = "REGISTER_INSTANCE" 6130 6131 // OperationTypeDeregisterInstance is a OperationType enum value 6132 OperationTypeDeregisterInstance = "DEREGISTER_INSTANCE" 6133) 6134 6135const ( 6136 // RecordTypeSrv is a RecordType enum value 6137 RecordTypeSrv = "SRV" 6138 6139 // RecordTypeA is a RecordType enum value 6140 RecordTypeA = "A" 6141 6142 // RecordTypeAaaa is a RecordType enum value 6143 RecordTypeAaaa = "AAAA" 6144 6145 // RecordTypeCname is a RecordType enum value 6146 RecordTypeCname = "CNAME" 6147) 6148 6149const ( 6150 // RoutingPolicyMultivalue is a RoutingPolicy enum value 6151 RoutingPolicyMultivalue = "MULTIVALUE" 6152 6153 // RoutingPolicyWeighted is a RoutingPolicy enum value 6154 RoutingPolicyWeighted = "WEIGHTED" 6155) 6156 6157const ( 6158 // ServiceFilterNameNamespaceId is a ServiceFilterName enum value 6159 ServiceFilterNameNamespaceId = "NAMESPACE_ID" 6160) 6161