1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package opsworkscm 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 opAssociateNode = "AssociateNode" 17 18// AssociateNodeRequest generates a "aws/request.Request" representing the 19// client's request for the AssociateNode 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 AssociateNode for more information on using the AssociateNode 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 AssociateNodeRequest method. 34// req, resp := client.AssociateNodeRequest(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/opsworkscm-2016-11-01/AssociateNode 42func (c *OpsWorksCM) AssociateNodeRequest(input *AssociateNodeInput) (req *request.Request, output *AssociateNodeOutput) { 43 op := &request.Operation{ 44 Name: opAssociateNode, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &AssociateNodeInput{} 51 } 52 53 output = &AssociateNodeOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// AssociateNode API operation for AWS OpsWorks CM. 59// 60// Associates a new node with the server. For more information about how to 61// disassociate a node, see DisassociateNode. 62// 63// On a Chef server: This command is an alternative to knife bootstrap. 64// 65// Example (Chef): aws opsworks-cm associate-node --server-name MyServer --node-name 66// MyManagedNode --engine-attributes "Name=CHEF_ORGANIZATION,Value=default" 67// "Name=CHEF_NODE_PUBLIC_KEY,Value=public-key-pem" 68// 69// On a Puppet server, this command is an alternative to the puppet cert sign 70// command that signs a Puppet node CSR. 71// 72// Example (Puppet): aws opsworks-cm associate-node --server-name MyServer --node-name 73// MyManagedNode --engine-attributes "Name=PUPPET_NODE_CSR,Value=csr-pem" 74// 75// A node can can only be associated with servers that are in a HEALTHY state. 76// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException 77// is thrown when the server does not exist. A ValidationException is raised 78// when parameters of the request are not valid. The AssociateNode API call 79// can be integrated into Auto Scaling configurations, AWS Cloudformation templates, 80// or the user data of a server's instance. 81// 82// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 83// with awserr.Error's Code and Message methods to get detailed information about 84// the error. 85// 86// See the AWS API reference guide for AWS OpsWorks CM's 87// API operation AssociateNode for usage and error information. 88// 89// Returned Error Types: 90// * InvalidStateException 91// The resource is in a state that does not allow you to perform a specified 92// action. 93// 94// * ResourceNotFoundException 95// The requested resource does not exist, or access was denied. 96// 97// * ValidationException 98// One or more of the provided request parameters are not valid. 99// 100// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/AssociateNode 101func (c *OpsWorksCM) AssociateNode(input *AssociateNodeInput) (*AssociateNodeOutput, error) { 102 req, out := c.AssociateNodeRequest(input) 103 return out, req.Send() 104} 105 106// AssociateNodeWithContext is the same as AssociateNode with the addition of 107// the ability to pass a context and additional request options. 108// 109// See AssociateNode for details on how to use this API operation. 110// 111// The context must be non-nil and will be used for request cancellation. If 112// the context is nil a panic will occur. In the future the SDK may create 113// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 114// for more information on using Contexts. 115func (c *OpsWorksCM) AssociateNodeWithContext(ctx aws.Context, input *AssociateNodeInput, opts ...request.Option) (*AssociateNodeOutput, error) { 116 req, out := c.AssociateNodeRequest(input) 117 req.SetContext(ctx) 118 req.ApplyOptions(opts...) 119 return out, req.Send() 120} 121 122const opCreateBackup = "CreateBackup" 123 124// CreateBackupRequest generates a "aws/request.Request" representing the 125// client's request for the CreateBackup operation. The "output" return 126// value will be populated with the request's response once the request completes 127// successfully. 128// 129// Use "Send" method on the returned Request to send the API call to the service. 130// the "output" return value is not valid until after Send returns without error. 131// 132// See CreateBackup for more information on using the CreateBackup 133// API call, and error handling. 134// 135// This method is useful when you want to inject custom logic or configuration 136// into the SDK's request lifecycle. Such as custom headers, or retry logic. 137// 138// 139// // Example sending a request using the CreateBackupRequest method. 140// req, resp := client.CreateBackupRequest(params) 141// 142// err := req.Send() 143// if err == nil { // resp is now filled 144// fmt.Println(resp) 145// } 146// 147// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateBackup 148func (c *OpsWorksCM) CreateBackupRequest(input *CreateBackupInput) (req *request.Request, output *CreateBackupOutput) { 149 op := &request.Operation{ 150 Name: opCreateBackup, 151 HTTPMethod: "POST", 152 HTTPPath: "/", 153 } 154 155 if input == nil { 156 input = &CreateBackupInput{} 157 } 158 159 output = &CreateBackupOutput{} 160 req = c.newRequest(op, input, output) 161 return 162} 163 164// CreateBackup API operation for AWS OpsWorks CM. 165// 166// Creates an application-level backup of a server. While the server is in the 167// BACKING_UP state, the server cannot be changed, and no additional backup 168// can be created. 169// 170// Backups can be created for servers in RUNNING, HEALTHY, and UNHEALTHY states. 171// By default, you can create a maximum of 50 manual backups. 172// 173// This operation is asynchronous. 174// 175// A LimitExceededException is thrown when the maximum number of manual backups 176// is reached. An InvalidStateException is thrown when the server is not in 177// any of the following states: RUNNING, HEALTHY, or UNHEALTHY. A ResourceNotFoundException 178// is thrown when the server is not found. A ValidationException is thrown when 179// parameters of the request are not valid. 180// 181// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 182// with awserr.Error's Code and Message methods to get detailed information about 183// the error. 184// 185// See the AWS API reference guide for AWS OpsWorks CM's 186// API operation CreateBackup for usage and error information. 187// 188// Returned Error Types: 189// * InvalidStateException 190// The resource is in a state that does not allow you to perform a specified 191// action. 192// 193// * LimitExceededException 194// The limit of servers or backups has been reached. 195// 196// * ResourceNotFoundException 197// The requested resource does not exist, or access was denied. 198// 199// * ValidationException 200// One or more of the provided request parameters are not valid. 201// 202// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateBackup 203func (c *OpsWorksCM) CreateBackup(input *CreateBackupInput) (*CreateBackupOutput, error) { 204 req, out := c.CreateBackupRequest(input) 205 return out, req.Send() 206} 207 208// CreateBackupWithContext is the same as CreateBackup with the addition of 209// the ability to pass a context and additional request options. 210// 211// See CreateBackup for details on how to use this API operation. 212// 213// The context must be non-nil and will be used for request cancellation. If 214// the context is nil a panic will occur. In the future the SDK may create 215// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 216// for more information on using Contexts. 217func (c *OpsWorksCM) CreateBackupWithContext(ctx aws.Context, input *CreateBackupInput, opts ...request.Option) (*CreateBackupOutput, error) { 218 req, out := c.CreateBackupRequest(input) 219 req.SetContext(ctx) 220 req.ApplyOptions(opts...) 221 return out, req.Send() 222} 223 224const opCreateServer = "CreateServer" 225 226// CreateServerRequest generates a "aws/request.Request" representing the 227// client's request for the CreateServer operation. The "output" return 228// value will be populated with the request's response once the request completes 229// successfully. 230// 231// Use "Send" method on the returned Request to send the API call to the service. 232// the "output" return value is not valid until after Send returns without error. 233// 234// See CreateServer for more information on using the CreateServer 235// API call, and error handling. 236// 237// This method is useful when you want to inject custom logic or configuration 238// into the SDK's request lifecycle. Such as custom headers, or retry logic. 239// 240// 241// // Example sending a request using the CreateServerRequest method. 242// req, resp := client.CreateServerRequest(params) 243// 244// err := req.Send() 245// if err == nil { // resp is now filled 246// fmt.Println(resp) 247// } 248// 249// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateServer 250func (c *OpsWorksCM) CreateServerRequest(input *CreateServerInput) (req *request.Request, output *CreateServerOutput) { 251 op := &request.Operation{ 252 Name: opCreateServer, 253 HTTPMethod: "POST", 254 HTTPPath: "/", 255 } 256 257 if input == nil { 258 input = &CreateServerInput{} 259 } 260 261 output = &CreateServerOutput{} 262 req = c.newRequest(op, input, output) 263 return 264} 265 266// CreateServer API operation for AWS OpsWorks CM. 267// 268// Creates and immedately starts a new server. The server is ready to use when 269// it is in the HEALTHY state. By default, you can create a maximum of 10 servers. 270// 271// This operation is asynchronous. 272// 273// A LimitExceededException is thrown when you have created the maximum number 274// of servers (10). A ResourceAlreadyExistsException is thrown when a server 275// with the same name already exists in the account. A ResourceNotFoundException 276// is thrown when you specify a backup ID that is not valid or is for a backup 277// that does not exist. A ValidationException is thrown when parameters of the 278// request are not valid. 279// 280// If you do not specify a security group by adding the SecurityGroupIds parameter, 281// AWS OpsWorks creates a new security group. 282// 283// Chef Automate: The default security group opens the Chef server to the world 284// on TCP port 443. If a KeyName is present, AWS OpsWorks enables SSH access. 285// SSH is also open to the world on TCP port 22. 286// 287// Puppet Enterprise: The default security group opens TCP ports 22, 443, 4433, 288// 8140, 8142, 8143, and 8170. If a KeyName is present, AWS OpsWorks enables 289// SSH access. SSH is also open to the world on TCP port 22. 290// 291// By default, your server is accessible from any IP address. We recommend that 292// you update your security group rules to allow access from known IP addresses 293// and address ranges only. To edit security group rules, open Security Groups 294// in the navigation pane of the EC2 management console. 295// 296// To specify your own domain for a server, and provide your own self-signed 297// or CA-signed certificate and private key, specify values for CustomDomain, 298// CustomCertificate, and CustomPrivateKey. 299// 300// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 301// with awserr.Error's Code and Message methods to get detailed information about 302// the error. 303// 304// See the AWS API reference guide for AWS OpsWorks CM's 305// API operation CreateServer for usage and error information. 306// 307// Returned Error Types: 308// * LimitExceededException 309// The limit of servers or backups has been reached. 310// 311// * ResourceAlreadyExistsException 312// The requested resource cannot be created because it already exists. 313// 314// * ResourceNotFoundException 315// The requested resource does not exist, or access was denied. 316// 317// * ValidationException 318// One or more of the provided request parameters are not valid. 319// 320// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/CreateServer 321func (c *OpsWorksCM) CreateServer(input *CreateServerInput) (*CreateServerOutput, error) { 322 req, out := c.CreateServerRequest(input) 323 return out, req.Send() 324} 325 326// CreateServerWithContext is the same as CreateServer with the addition of 327// the ability to pass a context and additional request options. 328// 329// See CreateServer for details on how to use this API operation. 330// 331// The context must be non-nil and will be used for request cancellation. If 332// the context is nil a panic will occur. In the future the SDK may create 333// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 334// for more information on using Contexts. 335func (c *OpsWorksCM) CreateServerWithContext(ctx aws.Context, input *CreateServerInput, opts ...request.Option) (*CreateServerOutput, error) { 336 req, out := c.CreateServerRequest(input) 337 req.SetContext(ctx) 338 req.ApplyOptions(opts...) 339 return out, req.Send() 340} 341 342const opDeleteBackup = "DeleteBackup" 343 344// DeleteBackupRequest generates a "aws/request.Request" representing the 345// client's request for the DeleteBackup operation. The "output" return 346// value will be populated with the request's response once the request completes 347// successfully. 348// 349// Use "Send" method on the returned Request to send the API call to the service. 350// the "output" return value is not valid until after Send returns without error. 351// 352// See DeleteBackup for more information on using the DeleteBackup 353// API call, and error handling. 354// 355// This method is useful when you want to inject custom logic or configuration 356// into the SDK's request lifecycle. Such as custom headers, or retry logic. 357// 358// 359// // Example sending a request using the DeleteBackupRequest method. 360// req, resp := client.DeleteBackupRequest(params) 361// 362// err := req.Send() 363// if err == nil { // resp is now filled 364// fmt.Println(resp) 365// } 366// 367// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteBackup 368func (c *OpsWorksCM) DeleteBackupRequest(input *DeleteBackupInput) (req *request.Request, output *DeleteBackupOutput) { 369 op := &request.Operation{ 370 Name: opDeleteBackup, 371 HTTPMethod: "POST", 372 HTTPPath: "/", 373 } 374 375 if input == nil { 376 input = &DeleteBackupInput{} 377 } 378 379 output = &DeleteBackupOutput{} 380 req = c.newRequest(op, input, output) 381 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 382 return 383} 384 385// DeleteBackup API operation for AWS OpsWorks CM. 386// 387// Deletes a backup. You can delete both manual and automated backups. This 388// operation is asynchronous. 389// 390// An InvalidStateException is thrown when a backup deletion is already in progress. 391// A ResourceNotFoundException is thrown when the backup does not exist. A ValidationException 392// is thrown when parameters of the request are not valid. 393// 394// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 395// with awserr.Error's Code and Message methods to get detailed information about 396// the error. 397// 398// See the AWS API reference guide for AWS OpsWorks CM's 399// API operation DeleteBackup for usage and error information. 400// 401// Returned Error Types: 402// * InvalidStateException 403// The resource is in a state that does not allow you to perform a specified 404// action. 405// 406// * ResourceNotFoundException 407// The requested resource does not exist, or access was denied. 408// 409// * ValidationException 410// One or more of the provided request parameters are not valid. 411// 412// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteBackup 413func (c *OpsWorksCM) DeleteBackup(input *DeleteBackupInput) (*DeleteBackupOutput, error) { 414 req, out := c.DeleteBackupRequest(input) 415 return out, req.Send() 416} 417 418// DeleteBackupWithContext is the same as DeleteBackup with the addition of 419// the ability to pass a context and additional request options. 420// 421// See DeleteBackup for details on how to use this API operation. 422// 423// The context must be non-nil and will be used for request cancellation. If 424// the context is nil a panic will occur. In the future the SDK may create 425// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 426// for more information on using Contexts. 427func (c *OpsWorksCM) DeleteBackupWithContext(ctx aws.Context, input *DeleteBackupInput, opts ...request.Option) (*DeleteBackupOutput, error) { 428 req, out := c.DeleteBackupRequest(input) 429 req.SetContext(ctx) 430 req.ApplyOptions(opts...) 431 return out, req.Send() 432} 433 434const opDeleteServer = "DeleteServer" 435 436// DeleteServerRequest generates a "aws/request.Request" representing the 437// client's request for the DeleteServer operation. The "output" return 438// value will be populated with the request's response once the request completes 439// successfully. 440// 441// Use "Send" method on the returned Request to send the API call to the service. 442// the "output" return value is not valid until after Send returns without error. 443// 444// See DeleteServer for more information on using the DeleteServer 445// API call, and error handling. 446// 447// This method is useful when you want to inject custom logic or configuration 448// into the SDK's request lifecycle. Such as custom headers, or retry logic. 449// 450// 451// // Example sending a request using the DeleteServerRequest method. 452// req, resp := client.DeleteServerRequest(params) 453// 454// err := req.Send() 455// if err == nil { // resp is now filled 456// fmt.Println(resp) 457// } 458// 459// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteServer 460func (c *OpsWorksCM) DeleteServerRequest(input *DeleteServerInput) (req *request.Request, output *DeleteServerOutput) { 461 op := &request.Operation{ 462 Name: opDeleteServer, 463 HTTPMethod: "POST", 464 HTTPPath: "/", 465 } 466 467 if input == nil { 468 input = &DeleteServerInput{} 469 } 470 471 output = &DeleteServerOutput{} 472 req = c.newRequest(op, input, output) 473 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 474 return 475} 476 477// DeleteServer API operation for AWS OpsWorks CM. 478// 479// Deletes the server and the underlying AWS CloudFormation stacks (including 480// the server's EC2 instance). When you run this command, the server state is 481// updated to DELETING. After the server is deleted, it is no longer returned 482// by DescribeServer requests. If the AWS CloudFormation stack cannot be deleted, 483// the server cannot be deleted. 484// 485// This operation is asynchronous. 486// 487// An InvalidStateException is thrown when a server deletion is already in progress. 488// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException 489// is raised when parameters of the request are not valid. 490// 491// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 492// with awserr.Error's Code and Message methods to get detailed information about 493// the error. 494// 495// See the AWS API reference guide for AWS OpsWorks CM's 496// API operation DeleteServer for usage and error information. 497// 498// Returned Error Types: 499// * InvalidStateException 500// The resource is in a state that does not allow you to perform a specified 501// action. 502// 503// * ResourceNotFoundException 504// The requested resource does not exist, or access was denied. 505// 506// * ValidationException 507// One or more of the provided request parameters are not valid. 508// 509// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DeleteServer 510func (c *OpsWorksCM) DeleteServer(input *DeleteServerInput) (*DeleteServerOutput, error) { 511 req, out := c.DeleteServerRequest(input) 512 return out, req.Send() 513} 514 515// DeleteServerWithContext is the same as DeleteServer with the addition of 516// the ability to pass a context and additional request options. 517// 518// See DeleteServer for details on how to use this API operation. 519// 520// The context must be non-nil and will be used for request cancellation. If 521// the context is nil a panic will occur. In the future the SDK may create 522// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 523// for more information on using Contexts. 524func (c *OpsWorksCM) DeleteServerWithContext(ctx aws.Context, input *DeleteServerInput, opts ...request.Option) (*DeleteServerOutput, error) { 525 req, out := c.DeleteServerRequest(input) 526 req.SetContext(ctx) 527 req.ApplyOptions(opts...) 528 return out, req.Send() 529} 530 531const opDescribeAccountAttributes = "DescribeAccountAttributes" 532 533// DescribeAccountAttributesRequest generates a "aws/request.Request" representing the 534// client's request for the DescribeAccountAttributes operation. The "output" return 535// value will be populated with the request's response once the request completes 536// successfully. 537// 538// Use "Send" method on the returned Request to send the API call to the service. 539// the "output" return value is not valid until after Send returns without error. 540// 541// See DescribeAccountAttributes for more information on using the DescribeAccountAttributes 542// API call, and error handling. 543// 544// This method is useful when you want to inject custom logic or configuration 545// into the SDK's request lifecycle. Such as custom headers, or retry logic. 546// 547// 548// // Example sending a request using the DescribeAccountAttributesRequest method. 549// req, resp := client.DescribeAccountAttributesRequest(params) 550// 551// err := req.Send() 552// if err == nil { // resp is now filled 553// fmt.Println(resp) 554// } 555// 556// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeAccountAttributes 557func (c *OpsWorksCM) DescribeAccountAttributesRequest(input *DescribeAccountAttributesInput) (req *request.Request, output *DescribeAccountAttributesOutput) { 558 op := &request.Operation{ 559 Name: opDescribeAccountAttributes, 560 HTTPMethod: "POST", 561 HTTPPath: "/", 562 } 563 564 if input == nil { 565 input = &DescribeAccountAttributesInput{} 566 } 567 568 output = &DescribeAccountAttributesOutput{} 569 req = c.newRequest(op, input, output) 570 return 571} 572 573// DescribeAccountAttributes API operation for AWS OpsWorks CM. 574// 575// Describes your OpsWorks-CM account attributes. 576// 577// This operation is synchronous. 578// 579// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 580// with awserr.Error's Code and Message methods to get detailed information about 581// the error. 582// 583// See the AWS API reference guide for AWS OpsWorks CM's 584// API operation DescribeAccountAttributes for usage and error information. 585// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeAccountAttributes 586func (c *OpsWorksCM) DescribeAccountAttributes(input *DescribeAccountAttributesInput) (*DescribeAccountAttributesOutput, error) { 587 req, out := c.DescribeAccountAttributesRequest(input) 588 return out, req.Send() 589} 590 591// DescribeAccountAttributesWithContext is the same as DescribeAccountAttributes with the addition of 592// the ability to pass a context and additional request options. 593// 594// See DescribeAccountAttributes for details on how to use this API operation. 595// 596// The context must be non-nil and will be used for request cancellation. If 597// the context is nil a panic will occur. In the future the SDK may create 598// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 599// for more information on using Contexts. 600func (c *OpsWorksCM) DescribeAccountAttributesWithContext(ctx aws.Context, input *DescribeAccountAttributesInput, opts ...request.Option) (*DescribeAccountAttributesOutput, error) { 601 req, out := c.DescribeAccountAttributesRequest(input) 602 req.SetContext(ctx) 603 req.ApplyOptions(opts...) 604 return out, req.Send() 605} 606 607const opDescribeBackups = "DescribeBackups" 608 609// DescribeBackupsRequest generates a "aws/request.Request" representing the 610// client's request for the DescribeBackups operation. The "output" return 611// value will be populated with the request's response once the request completes 612// successfully. 613// 614// Use "Send" method on the returned Request to send the API call to the service. 615// the "output" return value is not valid until after Send returns without error. 616// 617// See DescribeBackups for more information on using the DescribeBackups 618// API call, and error handling. 619// 620// This method is useful when you want to inject custom logic or configuration 621// into the SDK's request lifecycle. Such as custom headers, or retry logic. 622// 623// 624// // Example sending a request using the DescribeBackupsRequest method. 625// req, resp := client.DescribeBackupsRequest(params) 626// 627// err := req.Send() 628// if err == nil { // resp is now filled 629// fmt.Println(resp) 630// } 631// 632// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeBackups 633func (c *OpsWorksCM) DescribeBackupsRequest(input *DescribeBackupsInput) (req *request.Request, output *DescribeBackupsOutput) { 634 op := &request.Operation{ 635 Name: opDescribeBackups, 636 HTTPMethod: "POST", 637 HTTPPath: "/", 638 Paginator: &request.Paginator{ 639 InputTokens: []string{"NextToken"}, 640 OutputTokens: []string{"NextToken"}, 641 LimitToken: "MaxResults", 642 TruncationToken: "", 643 }, 644 } 645 646 if input == nil { 647 input = &DescribeBackupsInput{} 648 } 649 650 output = &DescribeBackupsOutput{} 651 req = c.newRequest(op, input, output) 652 return 653} 654 655// DescribeBackups API operation for AWS OpsWorks CM. 656// 657// Describes backups. The results are ordered by time, with newest backups first. 658// If you do not specify a BackupId or ServerName, the command returns all backups. 659// 660// This operation is synchronous. 661// 662// A ResourceNotFoundException is thrown when the backup does not exist. A ValidationException 663// is raised when parameters of the request are not valid. 664// 665// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 666// with awserr.Error's Code and Message methods to get detailed information about 667// the error. 668// 669// See the AWS API reference guide for AWS OpsWorks CM's 670// API operation DescribeBackups for usage and error information. 671// 672// Returned Error Types: 673// * ValidationException 674// One or more of the provided request parameters are not valid. 675// 676// * ResourceNotFoundException 677// The requested resource does not exist, or access was denied. 678// 679// * InvalidNextTokenException 680// This occurs when the provided nextToken is not valid. 681// 682// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeBackups 683func (c *OpsWorksCM) DescribeBackups(input *DescribeBackupsInput) (*DescribeBackupsOutput, error) { 684 req, out := c.DescribeBackupsRequest(input) 685 return out, req.Send() 686} 687 688// DescribeBackupsWithContext is the same as DescribeBackups with the addition of 689// the ability to pass a context and additional request options. 690// 691// See DescribeBackups for details on how to use this API operation. 692// 693// The context must be non-nil and will be used for request cancellation. If 694// the context is nil a panic will occur. In the future the SDK may create 695// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 696// for more information on using Contexts. 697func (c *OpsWorksCM) DescribeBackupsWithContext(ctx aws.Context, input *DescribeBackupsInput, opts ...request.Option) (*DescribeBackupsOutput, error) { 698 req, out := c.DescribeBackupsRequest(input) 699 req.SetContext(ctx) 700 req.ApplyOptions(opts...) 701 return out, req.Send() 702} 703 704// DescribeBackupsPages iterates over the pages of a DescribeBackups operation, 705// calling the "fn" function with the response data for each page. To stop 706// iterating, return false from the fn function. 707// 708// See DescribeBackups method for more information on how to use this operation. 709// 710// Note: This operation can generate multiple requests to a service. 711// 712// // Example iterating over at most 3 pages of a DescribeBackups operation. 713// pageNum := 0 714// err := client.DescribeBackupsPages(params, 715// func(page *opsworkscm.DescribeBackupsOutput, lastPage bool) bool { 716// pageNum++ 717// fmt.Println(page) 718// return pageNum <= 3 719// }) 720// 721func (c *OpsWorksCM) DescribeBackupsPages(input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool) error { 722 return c.DescribeBackupsPagesWithContext(aws.BackgroundContext(), input, fn) 723} 724 725// DescribeBackupsPagesWithContext same as DescribeBackupsPages except 726// it takes a Context and allows setting request options on the pages. 727// 728// The context must be non-nil and will be used for request cancellation. If 729// the context is nil a panic will occur. In the future the SDK may create 730// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 731// for more information on using Contexts. 732func (c *OpsWorksCM) DescribeBackupsPagesWithContext(ctx aws.Context, input *DescribeBackupsInput, fn func(*DescribeBackupsOutput, bool) bool, opts ...request.Option) error { 733 p := request.Pagination{ 734 NewRequest: func() (*request.Request, error) { 735 var inCpy *DescribeBackupsInput 736 if input != nil { 737 tmp := *input 738 inCpy = &tmp 739 } 740 req, _ := c.DescribeBackupsRequest(inCpy) 741 req.SetContext(ctx) 742 req.ApplyOptions(opts...) 743 return req, nil 744 }, 745 } 746 747 for p.Next() { 748 if !fn(p.Page().(*DescribeBackupsOutput), !p.HasNextPage()) { 749 break 750 } 751 } 752 753 return p.Err() 754} 755 756const opDescribeEvents = "DescribeEvents" 757 758// DescribeEventsRequest generates a "aws/request.Request" representing the 759// client's request for the DescribeEvents operation. The "output" return 760// value will be populated with the request's response once the request completes 761// successfully. 762// 763// Use "Send" method on the returned Request to send the API call to the service. 764// the "output" return value is not valid until after Send returns without error. 765// 766// See DescribeEvents for more information on using the DescribeEvents 767// API call, and error handling. 768// 769// This method is useful when you want to inject custom logic or configuration 770// into the SDK's request lifecycle. Such as custom headers, or retry logic. 771// 772// 773// // Example sending a request using the DescribeEventsRequest method. 774// req, resp := client.DescribeEventsRequest(params) 775// 776// err := req.Send() 777// if err == nil { // resp is now filled 778// fmt.Println(resp) 779// } 780// 781// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeEvents 782func (c *OpsWorksCM) DescribeEventsRequest(input *DescribeEventsInput) (req *request.Request, output *DescribeEventsOutput) { 783 op := &request.Operation{ 784 Name: opDescribeEvents, 785 HTTPMethod: "POST", 786 HTTPPath: "/", 787 Paginator: &request.Paginator{ 788 InputTokens: []string{"NextToken"}, 789 OutputTokens: []string{"NextToken"}, 790 LimitToken: "MaxResults", 791 TruncationToken: "", 792 }, 793 } 794 795 if input == nil { 796 input = &DescribeEventsInput{} 797 } 798 799 output = &DescribeEventsOutput{} 800 req = c.newRequest(op, input, output) 801 return 802} 803 804// DescribeEvents API operation for AWS OpsWorks CM. 805// 806// Describes events for a specified server. Results are ordered by time, with 807// newest events first. 808// 809// This operation is synchronous. 810// 811// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException 812// is raised when parameters of the request are not valid. 813// 814// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 815// with awserr.Error's Code and Message methods to get detailed information about 816// the error. 817// 818// See the AWS API reference guide for AWS OpsWorks CM's 819// API operation DescribeEvents for usage and error information. 820// 821// Returned Error Types: 822// * ValidationException 823// One or more of the provided request parameters are not valid. 824// 825// * InvalidNextTokenException 826// This occurs when the provided nextToken is not valid. 827// 828// * ResourceNotFoundException 829// The requested resource does not exist, or access was denied. 830// 831// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeEvents 832func (c *OpsWorksCM) DescribeEvents(input *DescribeEventsInput) (*DescribeEventsOutput, error) { 833 req, out := c.DescribeEventsRequest(input) 834 return out, req.Send() 835} 836 837// DescribeEventsWithContext is the same as DescribeEvents with the addition of 838// the ability to pass a context and additional request options. 839// 840// See DescribeEvents for details on how to use this API operation. 841// 842// The context must be non-nil and will be used for request cancellation. If 843// the context is nil a panic will occur. In the future the SDK may create 844// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 845// for more information on using Contexts. 846func (c *OpsWorksCM) DescribeEventsWithContext(ctx aws.Context, input *DescribeEventsInput, opts ...request.Option) (*DescribeEventsOutput, error) { 847 req, out := c.DescribeEventsRequest(input) 848 req.SetContext(ctx) 849 req.ApplyOptions(opts...) 850 return out, req.Send() 851} 852 853// DescribeEventsPages iterates over the pages of a DescribeEvents operation, 854// calling the "fn" function with the response data for each page. To stop 855// iterating, return false from the fn function. 856// 857// See DescribeEvents method for more information on how to use this operation. 858// 859// Note: This operation can generate multiple requests to a service. 860// 861// // Example iterating over at most 3 pages of a DescribeEvents operation. 862// pageNum := 0 863// err := client.DescribeEventsPages(params, 864// func(page *opsworkscm.DescribeEventsOutput, lastPage bool) bool { 865// pageNum++ 866// fmt.Println(page) 867// return pageNum <= 3 868// }) 869// 870func (c *OpsWorksCM) DescribeEventsPages(input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool) error { 871 return c.DescribeEventsPagesWithContext(aws.BackgroundContext(), input, fn) 872} 873 874// DescribeEventsPagesWithContext same as DescribeEventsPages except 875// it takes a Context and allows setting request options on the pages. 876// 877// The context must be non-nil and will be used for request cancellation. If 878// the context is nil a panic will occur. In the future the SDK may create 879// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 880// for more information on using Contexts. 881func (c *OpsWorksCM) DescribeEventsPagesWithContext(ctx aws.Context, input *DescribeEventsInput, fn func(*DescribeEventsOutput, bool) bool, opts ...request.Option) error { 882 p := request.Pagination{ 883 NewRequest: func() (*request.Request, error) { 884 var inCpy *DescribeEventsInput 885 if input != nil { 886 tmp := *input 887 inCpy = &tmp 888 } 889 req, _ := c.DescribeEventsRequest(inCpy) 890 req.SetContext(ctx) 891 req.ApplyOptions(opts...) 892 return req, nil 893 }, 894 } 895 896 for p.Next() { 897 if !fn(p.Page().(*DescribeEventsOutput), !p.HasNextPage()) { 898 break 899 } 900 } 901 902 return p.Err() 903} 904 905const opDescribeNodeAssociationStatus = "DescribeNodeAssociationStatus" 906 907// DescribeNodeAssociationStatusRequest generates a "aws/request.Request" representing the 908// client's request for the DescribeNodeAssociationStatus operation. The "output" return 909// value will be populated with the request's response once the request completes 910// successfully. 911// 912// Use "Send" method on the returned Request to send the API call to the service. 913// the "output" return value is not valid until after Send returns without error. 914// 915// See DescribeNodeAssociationStatus for more information on using the DescribeNodeAssociationStatus 916// API call, and error handling. 917// 918// This method is useful when you want to inject custom logic or configuration 919// into the SDK's request lifecycle. Such as custom headers, or retry logic. 920// 921// 922// // Example sending a request using the DescribeNodeAssociationStatusRequest method. 923// req, resp := client.DescribeNodeAssociationStatusRequest(params) 924// 925// err := req.Send() 926// if err == nil { // resp is now filled 927// fmt.Println(resp) 928// } 929// 930// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeNodeAssociationStatus 931func (c *OpsWorksCM) DescribeNodeAssociationStatusRequest(input *DescribeNodeAssociationStatusInput) (req *request.Request, output *DescribeNodeAssociationStatusOutput) { 932 op := &request.Operation{ 933 Name: opDescribeNodeAssociationStatus, 934 HTTPMethod: "POST", 935 HTTPPath: "/", 936 } 937 938 if input == nil { 939 input = &DescribeNodeAssociationStatusInput{} 940 } 941 942 output = &DescribeNodeAssociationStatusOutput{} 943 req = c.newRequest(op, input, output) 944 return 945} 946 947// DescribeNodeAssociationStatus API operation for AWS OpsWorks CM. 948// 949// Returns the current status of an existing association or disassociation request. 950// 951// A ResourceNotFoundException is thrown when no recent association or disassociation 952// request with the specified token is found, or when the server does not exist. 953// A ValidationException is raised when parameters of the request are not valid. 954// 955// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 956// with awserr.Error's Code and Message methods to get detailed information about 957// the error. 958// 959// See the AWS API reference guide for AWS OpsWorks CM's 960// API operation DescribeNodeAssociationStatus for usage and error information. 961// 962// Returned Error Types: 963// * ResourceNotFoundException 964// The requested resource does not exist, or access was denied. 965// 966// * ValidationException 967// One or more of the provided request parameters are not valid. 968// 969// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeNodeAssociationStatus 970func (c *OpsWorksCM) DescribeNodeAssociationStatus(input *DescribeNodeAssociationStatusInput) (*DescribeNodeAssociationStatusOutput, error) { 971 req, out := c.DescribeNodeAssociationStatusRequest(input) 972 return out, req.Send() 973} 974 975// DescribeNodeAssociationStatusWithContext is the same as DescribeNodeAssociationStatus with the addition of 976// the ability to pass a context and additional request options. 977// 978// See DescribeNodeAssociationStatus for details on how to use this API operation. 979// 980// The context must be non-nil and will be used for request cancellation. If 981// the context is nil a panic will occur. In the future the SDK may create 982// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 983// for more information on using Contexts. 984func (c *OpsWorksCM) DescribeNodeAssociationStatusWithContext(ctx aws.Context, input *DescribeNodeAssociationStatusInput, opts ...request.Option) (*DescribeNodeAssociationStatusOutput, error) { 985 req, out := c.DescribeNodeAssociationStatusRequest(input) 986 req.SetContext(ctx) 987 req.ApplyOptions(opts...) 988 return out, req.Send() 989} 990 991const opDescribeServers = "DescribeServers" 992 993// DescribeServersRequest generates a "aws/request.Request" representing the 994// client's request for the DescribeServers operation. The "output" return 995// value will be populated with the request's response once the request completes 996// successfully. 997// 998// Use "Send" method on the returned Request to send the API call to the service. 999// the "output" return value is not valid until after Send returns without error. 1000// 1001// See DescribeServers for more information on using the DescribeServers 1002// API call, and error handling. 1003// 1004// This method is useful when you want to inject custom logic or configuration 1005// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1006// 1007// 1008// // Example sending a request using the DescribeServersRequest method. 1009// req, resp := client.DescribeServersRequest(params) 1010// 1011// err := req.Send() 1012// if err == nil { // resp is now filled 1013// fmt.Println(resp) 1014// } 1015// 1016// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeServers 1017func (c *OpsWorksCM) DescribeServersRequest(input *DescribeServersInput) (req *request.Request, output *DescribeServersOutput) { 1018 op := &request.Operation{ 1019 Name: opDescribeServers, 1020 HTTPMethod: "POST", 1021 HTTPPath: "/", 1022 Paginator: &request.Paginator{ 1023 InputTokens: []string{"NextToken"}, 1024 OutputTokens: []string{"NextToken"}, 1025 LimitToken: "MaxResults", 1026 TruncationToken: "", 1027 }, 1028 } 1029 1030 if input == nil { 1031 input = &DescribeServersInput{} 1032 } 1033 1034 output = &DescribeServersOutput{} 1035 req = c.newRequest(op, input, output) 1036 return 1037} 1038 1039// DescribeServers API operation for AWS OpsWorks CM. 1040// 1041// Lists all configuration management servers that are identified with your 1042// account. Only the stored results from Amazon DynamoDB are returned. AWS OpsWorks 1043// CM does not query other services. 1044// 1045// This operation is synchronous. 1046// 1047// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException 1048// is raised when parameters of the request are not valid. 1049// 1050// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1051// with awserr.Error's Code and Message methods to get detailed information about 1052// the error. 1053// 1054// See the AWS API reference guide for AWS OpsWorks CM's 1055// API operation DescribeServers for usage and error information. 1056// 1057// Returned Error Types: 1058// * ValidationException 1059// One or more of the provided request parameters are not valid. 1060// 1061// * ResourceNotFoundException 1062// The requested resource does not exist, or access was denied. 1063// 1064// * InvalidNextTokenException 1065// This occurs when the provided nextToken is not valid. 1066// 1067// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DescribeServers 1068func (c *OpsWorksCM) DescribeServers(input *DescribeServersInput) (*DescribeServersOutput, error) { 1069 req, out := c.DescribeServersRequest(input) 1070 return out, req.Send() 1071} 1072 1073// DescribeServersWithContext is the same as DescribeServers with the addition of 1074// the ability to pass a context and additional request options. 1075// 1076// See DescribeServers for details on how to use this API operation. 1077// 1078// The context must be non-nil and will be used for request cancellation. If 1079// the context is nil a panic will occur. In the future the SDK may create 1080// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1081// for more information on using Contexts. 1082func (c *OpsWorksCM) DescribeServersWithContext(ctx aws.Context, input *DescribeServersInput, opts ...request.Option) (*DescribeServersOutput, error) { 1083 req, out := c.DescribeServersRequest(input) 1084 req.SetContext(ctx) 1085 req.ApplyOptions(opts...) 1086 return out, req.Send() 1087} 1088 1089// DescribeServersPages iterates over the pages of a DescribeServers operation, 1090// calling the "fn" function with the response data for each page. To stop 1091// iterating, return false from the fn function. 1092// 1093// See DescribeServers method for more information on how to use this operation. 1094// 1095// Note: This operation can generate multiple requests to a service. 1096// 1097// // Example iterating over at most 3 pages of a DescribeServers operation. 1098// pageNum := 0 1099// err := client.DescribeServersPages(params, 1100// func(page *opsworkscm.DescribeServersOutput, lastPage bool) bool { 1101// pageNum++ 1102// fmt.Println(page) 1103// return pageNum <= 3 1104// }) 1105// 1106func (c *OpsWorksCM) DescribeServersPages(input *DescribeServersInput, fn func(*DescribeServersOutput, bool) bool) error { 1107 return c.DescribeServersPagesWithContext(aws.BackgroundContext(), input, fn) 1108} 1109 1110// DescribeServersPagesWithContext same as DescribeServersPages except 1111// it takes a Context and allows setting request options on the pages. 1112// 1113// The context must be non-nil and will be used for request cancellation. If 1114// the context is nil a panic will occur. In the future the SDK may create 1115// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1116// for more information on using Contexts. 1117func (c *OpsWorksCM) DescribeServersPagesWithContext(ctx aws.Context, input *DescribeServersInput, fn func(*DescribeServersOutput, bool) bool, opts ...request.Option) error { 1118 p := request.Pagination{ 1119 NewRequest: func() (*request.Request, error) { 1120 var inCpy *DescribeServersInput 1121 if input != nil { 1122 tmp := *input 1123 inCpy = &tmp 1124 } 1125 req, _ := c.DescribeServersRequest(inCpy) 1126 req.SetContext(ctx) 1127 req.ApplyOptions(opts...) 1128 return req, nil 1129 }, 1130 } 1131 1132 for p.Next() { 1133 if !fn(p.Page().(*DescribeServersOutput), !p.HasNextPage()) { 1134 break 1135 } 1136 } 1137 1138 return p.Err() 1139} 1140 1141const opDisassociateNode = "DisassociateNode" 1142 1143// DisassociateNodeRequest generates a "aws/request.Request" representing the 1144// client's request for the DisassociateNode operation. The "output" return 1145// value will be populated with the request's response once the request completes 1146// successfully. 1147// 1148// Use "Send" method on the returned Request to send the API call to the service. 1149// the "output" return value is not valid until after Send returns without error. 1150// 1151// See DisassociateNode for more information on using the DisassociateNode 1152// API call, and error handling. 1153// 1154// This method is useful when you want to inject custom logic or configuration 1155// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1156// 1157// 1158// // Example sending a request using the DisassociateNodeRequest method. 1159// req, resp := client.DisassociateNodeRequest(params) 1160// 1161// err := req.Send() 1162// if err == nil { // resp is now filled 1163// fmt.Println(resp) 1164// } 1165// 1166// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DisassociateNode 1167func (c *OpsWorksCM) DisassociateNodeRequest(input *DisassociateNodeInput) (req *request.Request, output *DisassociateNodeOutput) { 1168 op := &request.Operation{ 1169 Name: opDisassociateNode, 1170 HTTPMethod: "POST", 1171 HTTPPath: "/", 1172 } 1173 1174 if input == nil { 1175 input = &DisassociateNodeInput{} 1176 } 1177 1178 output = &DisassociateNodeOutput{} 1179 req = c.newRequest(op, input, output) 1180 return 1181} 1182 1183// DisassociateNode API operation for AWS OpsWorks CM. 1184// 1185// Disassociates a node from an AWS OpsWorks CM server, and removes the node 1186// from the server's managed nodes. After a node is disassociated, the node 1187// key pair is no longer valid for accessing the configuration manager's API. 1188// For more information about how to associate a node, see AssociateNode. 1189// 1190// A node can can only be disassociated from a server that is in a HEALTHY state. 1191// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException 1192// is thrown when the server does not exist. A ValidationException is raised 1193// when parameters of the request are not valid. 1194// 1195// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1196// with awserr.Error's Code and Message methods to get detailed information about 1197// the error. 1198// 1199// See the AWS API reference guide for AWS OpsWorks CM's 1200// API operation DisassociateNode for usage and error information. 1201// 1202// Returned Error Types: 1203// * InvalidStateException 1204// The resource is in a state that does not allow you to perform a specified 1205// action. 1206// 1207// * ResourceNotFoundException 1208// The requested resource does not exist, or access was denied. 1209// 1210// * ValidationException 1211// One or more of the provided request parameters are not valid. 1212// 1213// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/DisassociateNode 1214func (c *OpsWorksCM) DisassociateNode(input *DisassociateNodeInput) (*DisassociateNodeOutput, error) { 1215 req, out := c.DisassociateNodeRequest(input) 1216 return out, req.Send() 1217} 1218 1219// DisassociateNodeWithContext is the same as DisassociateNode with the addition of 1220// the ability to pass a context and additional request options. 1221// 1222// See DisassociateNode for details on how to use this API operation. 1223// 1224// The context must be non-nil and will be used for request cancellation. If 1225// the context is nil a panic will occur. In the future the SDK may create 1226// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1227// for more information on using Contexts. 1228func (c *OpsWorksCM) DisassociateNodeWithContext(ctx aws.Context, input *DisassociateNodeInput, opts ...request.Option) (*DisassociateNodeOutput, error) { 1229 req, out := c.DisassociateNodeRequest(input) 1230 req.SetContext(ctx) 1231 req.ApplyOptions(opts...) 1232 return out, req.Send() 1233} 1234 1235const opExportServerEngineAttribute = "ExportServerEngineAttribute" 1236 1237// ExportServerEngineAttributeRequest generates a "aws/request.Request" representing the 1238// client's request for the ExportServerEngineAttribute operation. The "output" return 1239// value will be populated with the request's response once the request completes 1240// successfully. 1241// 1242// Use "Send" method on the returned Request to send the API call to the service. 1243// the "output" return value is not valid until after Send returns without error. 1244// 1245// See ExportServerEngineAttribute for more information on using the ExportServerEngineAttribute 1246// API call, and error handling. 1247// 1248// This method is useful when you want to inject custom logic or configuration 1249// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1250// 1251// 1252// // Example sending a request using the ExportServerEngineAttributeRequest method. 1253// req, resp := client.ExportServerEngineAttributeRequest(params) 1254// 1255// err := req.Send() 1256// if err == nil { // resp is now filled 1257// fmt.Println(resp) 1258// } 1259// 1260// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ExportServerEngineAttribute 1261func (c *OpsWorksCM) ExportServerEngineAttributeRequest(input *ExportServerEngineAttributeInput) (req *request.Request, output *ExportServerEngineAttributeOutput) { 1262 op := &request.Operation{ 1263 Name: opExportServerEngineAttribute, 1264 HTTPMethod: "POST", 1265 HTTPPath: "/", 1266 } 1267 1268 if input == nil { 1269 input = &ExportServerEngineAttributeInput{} 1270 } 1271 1272 output = &ExportServerEngineAttributeOutput{} 1273 req = c.newRequest(op, input, output) 1274 return 1275} 1276 1277// ExportServerEngineAttribute API operation for AWS OpsWorks CM. 1278// 1279// Exports a specified server engine attribute as a base64-encoded string. For 1280// example, you can export user data that you can use in EC2 to associate nodes 1281// with a server. 1282// 1283// This operation is synchronous. 1284// 1285// A ValidationException is raised when parameters of the request are not valid. 1286// A ResourceNotFoundException is thrown when the server does not exist. An 1287// InvalidStateException is thrown when the server is in any of the following 1288// states: CREATING, TERMINATED, FAILED or DELETING. 1289// 1290// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1291// with awserr.Error's Code and Message methods to get detailed information about 1292// the error. 1293// 1294// See the AWS API reference guide for AWS OpsWorks CM's 1295// API operation ExportServerEngineAttribute for usage and error information. 1296// 1297// Returned Error Types: 1298// * ValidationException 1299// One or more of the provided request parameters are not valid. 1300// 1301// * ResourceNotFoundException 1302// The requested resource does not exist, or access was denied. 1303// 1304// * InvalidStateException 1305// The resource is in a state that does not allow you to perform a specified 1306// action. 1307// 1308// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ExportServerEngineAttribute 1309func (c *OpsWorksCM) ExportServerEngineAttribute(input *ExportServerEngineAttributeInput) (*ExportServerEngineAttributeOutput, error) { 1310 req, out := c.ExportServerEngineAttributeRequest(input) 1311 return out, req.Send() 1312} 1313 1314// ExportServerEngineAttributeWithContext is the same as ExportServerEngineAttribute with the addition of 1315// the ability to pass a context and additional request options. 1316// 1317// See ExportServerEngineAttribute for details on how to use this API operation. 1318// 1319// The context must be non-nil and will be used for request cancellation. If 1320// the context is nil a panic will occur. In the future the SDK may create 1321// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1322// for more information on using Contexts. 1323func (c *OpsWorksCM) ExportServerEngineAttributeWithContext(ctx aws.Context, input *ExportServerEngineAttributeInput, opts ...request.Option) (*ExportServerEngineAttributeOutput, error) { 1324 req, out := c.ExportServerEngineAttributeRequest(input) 1325 req.SetContext(ctx) 1326 req.ApplyOptions(opts...) 1327 return out, req.Send() 1328} 1329 1330const opListTagsForResource = "ListTagsForResource" 1331 1332// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1333// client's request for the ListTagsForResource operation. The "output" return 1334// value will be populated with the request's response once the request completes 1335// successfully. 1336// 1337// Use "Send" method on the returned Request to send the API call to the service. 1338// the "output" return value is not valid until after Send returns without error. 1339// 1340// See ListTagsForResource for more information on using the ListTagsForResource 1341// API call, and error handling. 1342// 1343// This method is useful when you want to inject custom logic or configuration 1344// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1345// 1346// 1347// // Example sending a request using the ListTagsForResourceRequest method. 1348// req, resp := client.ListTagsForResourceRequest(params) 1349// 1350// err := req.Send() 1351// if err == nil { // resp is now filled 1352// fmt.Println(resp) 1353// } 1354// 1355// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ListTagsForResource 1356func (c *OpsWorksCM) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1357 op := &request.Operation{ 1358 Name: opListTagsForResource, 1359 HTTPMethod: "POST", 1360 HTTPPath: "/", 1361 Paginator: &request.Paginator{ 1362 InputTokens: []string{"NextToken"}, 1363 OutputTokens: []string{"NextToken"}, 1364 LimitToken: "MaxResults", 1365 TruncationToken: "", 1366 }, 1367 } 1368 1369 if input == nil { 1370 input = &ListTagsForResourceInput{} 1371 } 1372 1373 output = &ListTagsForResourceOutput{} 1374 req = c.newRequest(op, input, output) 1375 return 1376} 1377 1378// ListTagsForResource API operation for AWS OpsWorks CM. 1379// 1380// Returns a list of tags that are applied to the specified AWS OpsWorks for 1381// Chef Automate or AWS OpsWorks for Puppet Enterprise servers or backups. 1382// 1383// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1384// with awserr.Error's Code and Message methods to get detailed information about 1385// the error. 1386// 1387// See the AWS API reference guide for AWS OpsWorks CM's 1388// API operation ListTagsForResource for usage and error information. 1389// 1390// Returned Error Types: 1391// * ResourceNotFoundException 1392// The requested resource does not exist, or access was denied. 1393// 1394// * ValidationException 1395// One or more of the provided request parameters are not valid. 1396// 1397// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/ListTagsForResource 1398func (c *OpsWorksCM) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1399 req, out := c.ListTagsForResourceRequest(input) 1400 return out, req.Send() 1401} 1402 1403// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1404// the ability to pass a context and additional request options. 1405// 1406// See ListTagsForResource for details on how to use this API operation. 1407// 1408// The context must be non-nil and will be used for request cancellation. If 1409// the context is nil a panic will occur. In the future the SDK may create 1410// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1411// for more information on using Contexts. 1412func (c *OpsWorksCM) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1413 req, out := c.ListTagsForResourceRequest(input) 1414 req.SetContext(ctx) 1415 req.ApplyOptions(opts...) 1416 return out, req.Send() 1417} 1418 1419// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, 1420// calling the "fn" function with the response data for each page. To stop 1421// iterating, return false from the fn function. 1422// 1423// See ListTagsForResource method for more information on how to use this operation. 1424// 1425// Note: This operation can generate multiple requests to a service. 1426// 1427// // Example iterating over at most 3 pages of a ListTagsForResource operation. 1428// pageNum := 0 1429// err := client.ListTagsForResourcePages(params, 1430// func(page *opsworkscm.ListTagsForResourceOutput, lastPage bool) bool { 1431// pageNum++ 1432// fmt.Println(page) 1433// return pageNum <= 3 1434// }) 1435// 1436func (c *OpsWorksCM) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { 1437 return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) 1438} 1439 1440// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except 1441// it takes a Context and allows setting request options on the pages. 1442// 1443// The context must be non-nil and will be used for request cancellation. If 1444// the context is nil a panic will occur. In the future the SDK may create 1445// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1446// for more information on using Contexts. 1447func (c *OpsWorksCM) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { 1448 p := request.Pagination{ 1449 NewRequest: func() (*request.Request, error) { 1450 var inCpy *ListTagsForResourceInput 1451 if input != nil { 1452 tmp := *input 1453 inCpy = &tmp 1454 } 1455 req, _ := c.ListTagsForResourceRequest(inCpy) 1456 req.SetContext(ctx) 1457 req.ApplyOptions(opts...) 1458 return req, nil 1459 }, 1460 } 1461 1462 for p.Next() { 1463 if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { 1464 break 1465 } 1466 } 1467 1468 return p.Err() 1469} 1470 1471const opRestoreServer = "RestoreServer" 1472 1473// RestoreServerRequest generates a "aws/request.Request" representing the 1474// client's request for the RestoreServer operation. The "output" return 1475// value will be populated with the request's response once the request completes 1476// successfully. 1477// 1478// Use "Send" method on the returned Request to send the API call to the service. 1479// the "output" return value is not valid until after Send returns without error. 1480// 1481// See RestoreServer for more information on using the RestoreServer 1482// API call, and error handling. 1483// 1484// This method is useful when you want to inject custom logic or configuration 1485// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1486// 1487// 1488// // Example sending a request using the RestoreServerRequest method. 1489// req, resp := client.RestoreServerRequest(params) 1490// 1491// err := req.Send() 1492// if err == nil { // resp is now filled 1493// fmt.Println(resp) 1494// } 1495// 1496// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/RestoreServer 1497func (c *OpsWorksCM) RestoreServerRequest(input *RestoreServerInput) (req *request.Request, output *RestoreServerOutput) { 1498 op := &request.Operation{ 1499 Name: opRestoreServer, 1500 HTTPMethod: "POST", 1501 HTTPPath: "/", 1502 } 1503 1504 if input == nil { 1505 input = &RestoreServerInput{} 1506 } 1507 1508 output = &RestoreServerOutput{} 1509 req = c.newRequest(op, input, output) 1510 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1511 return 1512} 1513 1514// RestoreServer API operation for AWS OpsWorks CM. 1515// 1516// Restores a backup to a server that is in a CONNECTION_LOST, HEALTHY, RUNNING, 1517// UNHEALTHY, or TERMINATED state. When you run RestoreServer, the server's 1518// EC2 instance is deleted, and a new EC2 instance is configured. RestoreServer 1519// maintains the existing server endpoint, so configuration management of the 1520// server's client devices (nodes) should continue to work. 1521// 1522// Restoring from a backup is performed by creating a new EC2 instance. If restoration 1523// is successful, and the server is in a HEALTHY state, AWS OpsWorks CM switches 1524// traffic over to the new instance. After restoration is finished, the old 1525// EC2 instance is maintained in a Running or Stopped state, but is eventually 1526// terminated. 1527// 1528// This operation is asynchronous. 1529// 1530// An InvalidStateException is thrown when the server is not in a valid state. 1531// A ResourceNotFoundException is thrown when the server does not exist. A ValidationException 1532// is raised when parameters of the request are not valid. 1533// 1534// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1535// with awserr.Error's Code and Message methods to get detailed information about 1536// the error. 1537// 1538// See the AWS API reference guide for AWS OpsWorks CM's 1539// API operation RestoreServer for usage and error information. 1540// 1541// Returned Error Types: 1542// * InvalidStateException 1543// The resource is in a state that does not allow you to perform a specified 1544// action. 1545// 1546// * ResourceNotFoundException 1547// The requested resource does not exist, or access was denied. 1548// 1549// * ValidationException 1550// One or more of the provided request parameters are not valid. 1551// 1552// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/RestoreServer 1553func (c *OpsWorksCM) RestoreServer(input *RestoreServerInput) (*RestoreServerOutput, error) { 1554 req, out := c.RestoreServerRequest(input) 1555 return out, req.Send() 1556} 1557 1558// RestoreServerWithContext is the same as RestoreServer with the addition of 1559// the ability to pass a context and additional request options. 1560// 1561// See RestoreServer for details on how to use this API operation. 1562// 1563// The context must be non-nil and will be used for request cancellation. If 1564// the context is nil a panic will occur. In the future the SDK may create 1565// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1566// for more information on using Contexts. 1567func (c *OpsWorksCM) RestoreServerWithContext(ctx aws.Context, input *RestoreServerInput, opts ...request.Option) (*RestoreServerOutput, error) { 1568 req, out := c.RestoreServerRequest(input) 1569 req.SetContext(ctx) 1570 req.ApplyOptions(opts...) 1571 return out, req.Send() 1572} 1573 1574const opStartMaintenance = "StartMaintenance" 1575 1576// StartMaintenanceRequest generates a "aws/request.Request" representing the 1577// client's request for the StartMaintenance operation. The "output" return 1578// value will be populated with the request's response once the request completes 1579// successfully. 1580// 1581// Use "Send" method on the returned Request to send the API call to the service. 1582// the "output" return value is not valid until after Send returns without error. 1583// 1584// See StartMaintenance for more information on using the StartMaintenance 1585// API call, and error handling. 1586// 1587// This method is useful when you want to inject custom logic or configuration 1588// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1589// 1590// 1591// // Example sending a request using the StartMaintenanceRequest method. 1592// req, resp := client.StartMaintenanceRequest(params) 1593// 1594// err := req.Send() 1595// if err == nil { // resp is now filled 1596// fmt.Println(resp) 1597// } 1598// 1599// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/StartMaintenance 1600func (c *OpsWorksCM) StartMaintenanceRequest(input *StartMaintenanceInput) (req *request.Request, output *StartMaintenanceOutput) { 1601 op := &request.Operation{ 1602 Name: opStartMaintenance, 1603 HTTPMethod: "POST", 1604 HTTPPath: "/", 1605 } 1606 1607 if input == nil { 1608 input = &StartMaintenanceInput{} 1609 } 1610 1611 output = &StartMaintenanceOutput{} 1612 req = c.newRequest(op, input, output) 1613 return 1614} 1615 1616// StartMaintenance API operation for AWS OpsWorks CM. 1617// 1618// Manually starts server maintenance. This command can be useful if an earlier 1619// maintenance attempt failed, and the underlying cause of maintenance failure 1620// has been resolved. The server is in an UNDER_MAINTENANCE state while maintenance 1621// is in progress. 1622// 1623// Maintenance can only be started on servers in HEALTHY and UNHEALTHY states. 1624// Otherwise, an InvalidStateException is thrown. A ResourceNotFoundException 1625// is thrown when the server does not exist. A ValidationException is raised 1626// when parameters of the request are not valid. 1627// 1628// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1629// with awserr.Error's Code and Message methods to get detailed information about 1630// the error. 1631// 1632// See the AWS API reference guide for AWS OpsWorks CM's 1633// API operation StartMaintenance for usage and error information. 1634// 1635// Returned Error Types: 1636// * InvalidStateException 1637// The resource is in a state that does not allow you to perform a specified 1638// action. 1639// 1640// * ResourceNotFoundException 1641// The requested resource does not exist, or access was denied. 1642// 1643// * ValidationException 1644// One or more of the provided request parameters are not valid. 1645// 1646// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/StartMaintenance 1647func (c *OpsWorksCM) StartMaintenance(input *StartMaintenanceInput) (*StartMaintenanceOutput, error) { 1648 req, out := c.StartMaintenanceRequest(input) 1649 return out, req.Send() 1650} 1651 1652// StartMaintenanceWithContext is the same as StartMaintenance with the addition of 1653// the ability to pass a context and additional request options. 1654// 1655// See StartMaintenance for details on how to use this API operation. 1656// 1657// The context must be non-nil and will be used for request cancellation. If 1658// the context is nil a panic will occur. In the future the SDK may create 1659// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1660// for more information on using Contexts. 1661func (c *OpsWorksCM) StartMaintenanceWithContext(ctx aws.Context, input *StartMaintenanceInput, opts ...request.Option) (*StartMaintenanceOutput, error) { 1662 req, out := c.StartMaintenanceRequest(input) 1663 req.SetContext(ctx) 1664 req.ApplyOptions(opts...) 1665 return out, req.Send() 1666} 1667 1668const opTagResource = "TagResource" 1669 1670// TagResourceRequest generates a "aws/request.Request" representing the 1671// client's request for the TagResource operation. The "output" return 1672// value will be populated with the request's response once the request completes 1673// successfully. 1674// 1675// Use "Send" method on the returned Request to send the API call to the service. 1676// the "output" return value is not valid until after Send returns without error. 1677// 1678// See TagResource for more information on using the TagResource 1679// API call, and error handling. 1680// 1681// This method is useful when you want to inject custom logic or configuration 1682// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1683// 1684// 1685// // Example sending a request using the TagResourceRequest method. 1686// req, resp := client.TagResourceRequest(params) 1687// 1688// err := req.Send() 1689// if err == nil { // resp is now filled 1690// fmt.Println(resp) 1691// } 1692// 1693// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/TagResource 1694func (c *OpsWorksCM) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1695 op := &request.Operation{ 1696 Name: opTagResource, 1697 HTTPMethod: "POST", 1698 HTTPPath: "/", 1699 } 1700 1701 if input == nil { 1702 input = &TagResourceInput{} 1703 } 1704 1705 output = &TagResourceOutput{} 1706 req = c.newRequest(op, input, output) 1707 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1708 return 1709} 1710 1711// TagResource API operation for AWS OpsWorks CM. 1712// 1713// Applies tags to an AWS OpsWorks for Chef Automate or AWS OpsWorks for Puppet 1714// Enterprise server, or to server backups. 1715// 1716// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1717// with awserr.Error's Code and Message methods to get detailed information about 1718// the error. 1719// 1720// See the AWS API reference guide for AWS OpsWorks CM's 1721// API operation TagResource for usage and error information. 1722// 1723// Returned Error Types: 1724// * ResourceNotFoundException 1725// The requested resource does not exist, or access was denied. 1726// 1727// * ValidationException 1728// One or more of the provided request parameters are not valid. 1729// 1730// * InvalidStateException 1731// The resource is in a state that does not allow you to perform a specified 1732// action. 1733// 1734// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/TagResource 1735func (c *OpsWorksCM) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1736 req, out := c.TagResourceRequest(input) 1737 return out, req.Send() 1738} 1739 1740// TagResourceWithContext is the same as TagResource with the addition of 1741// the ability to pass a context and additional request options. 1742// 1743// See TagResource for details on how to use this API operation. 1744// 1745// The context must be non-nil and will be used for request cancellation. If 1746// the context is nil a panic will occur. In the future the SDK may create 1747// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1748// for more information on using Contexts. 1749func (c *OpsWorksCM) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1750 req, out := c.TagResourceRequest(input) 1751 req.SetContext(ctx) 1752 req.ApplyOptions(opts...) 1753 return out, req.Send() 1754} 1755 1756const opUntagResource = "UntagResource" 1757 1758// UntagResourceRequest generates a "aws/request.Request" representing the 1759// client's request for the UntagResource operation. The "output" return 1760// value will be populated with the request's response once the request completes 1761// successfully. 1762// 1763// Use "Send" method on the returned Request to send the API call to the service. 1764// the "output" return value is not valid until after Send returns without error. 1765// 1766// See UntagResource for more information on using the UntagResource 1767// API call, and error handling. 1768// 1769// This method is useful when you want to inject custom logic or configuration 1770// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1771// 1772// 1773// // Example sending a request using the UntagResourceRequest method. 1774// req, resp := client.UntagResourceRequest(params) 1775// 1776// err := req.Send() 1777// if err == nil { // resp is now filled 1778// fmt.Println(resp) 1779// } 1780// 1781// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UntagResource 1782func (c *OpsWorksCM) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1783 op := &request.Operation{ 1784 Name: opUntagResource, 1785 HTTPMethod: "POST", 1786 HTTPPath: "/", 1787 } 1788 1789 if input == nil { 1790 input = &UntagResourceInput{} 1791 } 1792 1793 output = &UntagResourceOutput{} 1794 req = c.newRequest(op, input, output) 1795 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1796 return 1797} 1798 1799// UntagResource API operation for AWS OpsWorks CM. 1800// 1801// Removes specified tags from an AWS OpsWorks-CM server or backup. 1802// 1803// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1804// with awserr.Error's Code and Message methods to get detailed information about 1805// the error. 1806// 1807// See the AWS API reference guide for AWS OpsWorks CM's 1808// API operation UntagResource for usage and error information. 1809// 1810// Returned Error Types: 1811// * ResourceNotFoundException 1812// The requested resource does not exist, or access was denied. 1813// 1814// * ValidationException 1815// One or more of the provided request parameters are not valid. 1816// 1817// * InvalidStateException 1818// The resource is in a state that does not allow you to perform a specified 1819// action. 1820// 1821// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UntagResource 1822func (c *OpsWorksCM) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1823 req, out := c.UntagResourceRequest(input) 1824 return out, req.Send() 1825} 1826 1827// UntagResourceWithContext is the same as UntagResource with the addition of 1828// the ability to pass a context and additional request options. 1829// 1830// See UntagResource for details on how to use this API operation. 1831// 1832// The context must be non-nil and will be used for request cancellation. If 1833// the context is nil a panic will occur. In the future the SDK may create 1834// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1835// for more information on using Contexts. 1836func (c *OpsWorksCM) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1837 req, out := c.UntagResourceRequest(input) 1838 req.SetContext(ctx) 1839 req.ApplyOptions(opts...) 1840 return out, req.Send() 1841} 1842 1843const opUpdateServer = "UpdateServer" 1844 1845// UpdateServerRequest generates a "aws/request.Request" representing the 1846// client's request for the UpdateServer operation. The "output" return 1847// value will be populated with the request's response once the request completes 1848// successfully. 1849// 1850// Use "Send" method on the returned Request to send the API call to the service. 1851// the "output" return value is not valid until after Send returns without error. 1852// 1853// See UpdateServer for more information on using the UpdateServer 1854// API call, and error handling. 1855// 1856// This method is useful when you want to inject custom logic or configuration 1857// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1858// 1859// 1860// // Example sending a request using the UpdateServerRequest method. 1861// req, resp := client.UpdateServerRequest(params) 1862// 1863// err := req.Send() 1864// if err == nil { // resp is now filled 1865// fmt.Println(resp) 1866// } 1867// 1868// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServer 1869func (c *OpsWorksCM) UpdateServerRequest(input *UpdateServerInput) (req *request.Request, output *UpdateServerOutput) { 1870 op := &request.Operation{ 1871 Name: opUpdateServer, 1872 HTTPMethod: "POST", 1873 HTTPPath: "/", 1874 } 1875 1876 if input == nil { 1877 input = &UpdateServerInput{} 1878 } 1879 1880 output = &UpdateServerOutput{} 1881 req = c.newRequest(op, input, output) 1882 return 1883} 1884 1885// UpdateServer API operation for AWS OpsWorks CM. 1886// 1887// Updates settings for a server. 1888// 1889// This operation is synchronous. 1890// 1891// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1892// with awserr.Error's Code and Message methods to get detailed information about 1893// the error. 1894// 1895// See the AWS API reference guide for AWS OpsWorks CM's 1896// API operation UpdateServer for usage and error information. 1897// 1898// Returned Error Types: 1899// * InvalidStateException 1900// The resource is in a state that does not allow you to perform a specified 1901// action. 1902// 1903// * ResourceNotFoundException 1904// The requested resource does not exist, or access was denied. 1905// 1906// * ValidationException 1907// One or more of the provided request parameters are not valid. 1908// 1909// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServer 1910func (c *OpsWorksCM) UpdateServer(input *UpdateServerInput) (*UpdateServerOutput, error) { 1911 req, out := c.UpdateServerRequest(input) 1912 return out, req.Send() 1913} 1914 1915// UpdateServerWithContext is the same as UpdateServer with the addition of 1916// the ability to pass a context and additional request options. 1917// 1918// See UpdateServer for details on how to use this API operation. 1919// 1920// The context must be non-nil and will be used for request cancellation. If 1921// the context is nil a panic will occur. In the future the SDK may create 1922// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1923// for more information on using Contexts. 1924func (c *OpsWorksCM) UpdateServerWithContext(ctx aws.Context, input *UpdateServerInput, opts ...request.Option) (*UpdateServerOutput, error) { 1925 req, out := c.UpdateServerRequest(input) 1926 req.SetContext(ctx) 1927 req.ApplyOptions(opts...) 1928 return out, req.Send() 1929} 1930 1931const opUpdateServerEngineAttributes = "UpdateServerEngineAttributes" 1932 1933// UpdateServerEngineAttributesRequest generates a "aws/request.Request" representing the 1934// client's request for the UpdateServerEngineAttributes operation. The "output" return 1935// value will be populated with the request's response once the request completes 1936// successfully. 1937// 1938// Use "Send" method on the returned Request to send the API call to the service. 1939// the "output" return value is not valid until after Send returns without error. 1940// 1941// See UpdateServerEngineAttributes for more information on using the UpdateServerEngineAttributes 1942// API call, and error handling. 1943// 1944// This method is useful when you want to inject custom logic or configuration 1945// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1946// 1947// 1948// // Example sending a request using the UpdateServerEngineAttributesRequest method. 1949// req, resp := client.UpdateServerEngineAttributesRequest(params) 1950// 1951// err := req.Send() 1952// if err == nil { // resp is now filled 1953// fmt.Println(resp) 1954// } 1955// 1956// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServerEngineAttributes 1957func (c *OpsWorksCM) UpdateServerEngineAttributesRequest(input *UpdateServerEngineAttributesInput) (req *request.Request, output *UpdateServerEngineAttributesOutput) { 1958 op := &request.Operation{ 1959 Name: opUpdateServerEngineAttributes, 1960 HTTPMethod: "POST", 1961 HTTPPath: "/", 1962 } 1963 1964 if input == nil { 1965 input = &UpdateServerEngineAttributesInput{} 1966 } 1967 1968 output = &UpdateServerEngineAttributesOutput{} 1969 req = c.newRequest(op, input, output) 1970 return 1971} 1972 1973// UpdateServerEngineAttributes API operation for AWS OpsWorks CM. 1974// 1975// Updates engine-specific attributes on a specified server. The server enters 1976// the MODIFYING state when this operation is in progress. Only one update can 1977// occur at a time. You can use this command to reset a Chef server's public 1978// key (CHEF_PIVOTAL_KEY) or a Puppet server's admin password (PUPPET_ADMIN_PASSWORD). 1979// 1980// This operation is asynchronous. 1981// 1982// This operation can only be called for servers in HEALTHY or UNHEALTHY states. 1983// Otherwise, an InvalidStateException is raised. A ResourceNotFoundException 1984// is thrown when the server does not exist. A ValidationException is raised 1985// when parameters of the request are not valid. 1986// 1987// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1988// with awserr.Error's Code and Message methods to get detailed information about 1989// the error. 1990// 1991// See the AWS API reference guide for AWS OpsWorks CM's 1992// API operation UpdateServerEngineAttributes for usage and error information. 1993// 1994// Returned Error Types: 1995// * InvalidStateException 1996// The resource is in a state that does not allow you to perform a specified 1997// action. 1998// 1999// * ResourceNotFoundException 2000// The requested resource does not exist, or access was denied. 2001// 2002// * ValidationException 2003// One or more of the provided request parameters are not valid. 2004// 2005// See also, https://docs.aws.amazon.com/goto/WebAPI/opsworkscm-2016-11-01/UpdateServerEngineAttributes 2006func (c *OpsWorksCM) UpdateServerEngineAttributes(input *UpdateServerEngineAttributesInput) (*UpdateServerEngineAttributesOutput, error) { 2007 req, out := c.UpdateServerEngineAttributesRequest(input) 2008 return out, req.Send() 2009} 2010 2011// UpdateServerEngineAttributesWithContext is the same as UpdateServerEngineAttributes with the addition of 2012// the ability to pass a context and additional request options. 2013// 2014// See UpdateServerEngineAttributes for details on how to use this API operation. 2015// 2016// The context must be non-nil and will be used for request cancellation. If 2017// the context is nil a panic will occur. In the future the SDK may create 2018// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 2019// for more information on using Contexts. 2020func (c *OpsWorksCM) UpdateServerEngineAttributesWithContext(ctx aws.Context, input *UpdateServerEngineAttributesInput, opts ...request.Option) (*UpdateServerEngineAttributesOutput, error) { 2021 req, out := c.UpdateServerEngineAttributesRequest(input) 2022 req.SetContext(ctx) 2023 req.ApplyOptions(opts...) 2024 return out, req.Send() 2025} 2026 2027// Stores account attributes. 2028type AccountAttribute struct { 2029 _ struct{} `type:"structure"` 2030 2031 // The maximum allowed value. 2032 Maximum *int64 `type:"integer"` 2033 2034 // The attribute name. The following are supported attribute names. 2035 // 2036 // * ServerLimit: The number of current servers/maximum number of servers 2037 // allowed. By default, you can have a maximum of 10 servers. 2038 // 2039 // * ManualBackupLimit: The number of current manual backups/maximum number 2040 // of backups allowed. By default, you can have a maximum of 50 manual backups 2041 // saved. 2042 Name *string `type:"string"` 2043 2044 // The current usage, such as the current number of servers that are associated 2045 // with the account. 2046 Used *int64 `type:"integer"` 2047} 2048 2049// String returns the string representation 2050func (s AccountAttribute) String() string { 2051 return awsutil.Prettify(s) 2052} 2053 2054// GoString returns the string representation 2055func (s AccountAttribute) GoString() string { 2056 return s.String() 2057} 2058 2059// SetMaximum sets the Maximum field's value. 2060func (s *AccountAttribute) SetMaximum(v int64) *AccountAttribute { 2061 s.Maximum = &v 2062 return s 2063} 2064 2065// SetName sets the Name field's value. 2066func (s *AccountAttribute) SetName(v string) *AccountAttribute { 2067 s.Name = &v 2068 return s 2069} 2070 2071// SetUsed sets the Used field's value. 2072func (s *AccountAttribute) SetUsed(v int64) *AccountAttribute { 2073 s.Used = &v 2074 return s 2075} 2076 2077type AssociateNodeInput struct { 2078 _ struct{} `type:"structure"` 2079 2080 // Engine attributes used for associating the node. 2081 // 2082 // Attributes accepted in a AssociateNode request for Chef 2083 // 2084 // * CHEF_ORGANIZATION: The Chef organization with which the node is associated. 2085 // By default only one organization named default can exist. 2086 // 2087 // * CHEF_NODE_PUBLIC_KEY: A PEM-formatted public key. This key is required 2088 // for the chef-client agent to access the Chef API. 2089 // 2090 // Attributes accepted in a AssociateNode request for Puppet 2091 // 2092 // * PUPPET_NODE_CSR: A PEM-formatted certificate-signing request (CSR) that 2093 // is created by the node. 2094 // 2095 // EngineAttributes is a required field 2096 EngineAttributes []*EngineAttribute `type:"list" required:"true"` 2097 2098 // The name of the node. 2099 // 2100 // NodeName is a required field 2101 NodeName *string `type:"string" required:"true"` 2102 2103 // The name of the server with which to associate the node. 2104 // 2105 // ServerName is a required field 2106 ServerName *string `min:"1" type:"string" required:"true"` 2107} 2108 2109// String returns the string representation 2110func (s AssociateNodeInput) String() string { 2111 return awsutil.Prettify(s) 2112} 2113 2114// GoString returns the string representation 2115func (s AssociateNodeInput) GoString() string { 2116 return s.String() 2117} 2118 2119// Validate inspects the fields of the type to determine if they are valid. 2120func (s *AssociateNodeInput) Validate() error { 2121 invalidParams := request.ErrInvalidParams{Context: "AssociateNodeInput"} 2122 if s.EngineAttributes == nil { 2123 invalidParams.Add(request.NewErrParamRequired("EngineAttributes")) 2124 } 2125 if s.NodeName == nil { 2126 invalidParams.Add(request.NewErrParamRequired("NodeName")) 2127 } 2128 if s.ServerName == nil { 2129 invalidParams.Add(request.NewErrParamRequired("ServerName")) 2130 } 2131 if s.ServerName != nil && len(*s.ServerName) < 1 { 2132 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 2133 } 2134 2135 if invalidParams.Len() > 0 { 2136 return invalidParams 2137 } 2138 return nil 2139} 2140 2141// SetEngineAttributes sets the EngineAttributes field's value. 2142func (s *AssociateNodeInput) SetEngineAttributes(v []*EngineAttribute) *AssociateNodeInput { 2143 s.EngineAttributes = v 2144 return s 2145} 2146 2147// SetNodeName sets the NodeName field's value. 2148func (s *AssociateNodeInput) SetNodeName(v string) *AssociateNodeInput { 2149 s.NodeName = &v 2150 return s 2151} 2152 2153// SetServerName sets the ServerName field's value. 2154func (s *AssociateNodeInput) SetServerName(v string) *AssociateNodeInput { 2155 s.ServerName = &v 2156 return s 2157} 2158 2159type AssociateNodeOutput struct { 2160 _ struct{} `type:"structure"` 2161 2162 // Contains a token which can be passed to the DescribeNodeAssociationStatus 2163 // API call to get the status of the association request. 2164 NodeAssociationStatusToken *string `type:"string"` 2165} 2166 2167// String returns the string representation 2168func (s AssociateNodeOutput) String() string { 2169 return awsutil.Prettify(s) 2170} 2171 2172// GoString returns the string representation 2173func (s AssociateNodeOutput) GoString() string { 2174 return s.String() 2175} 2176 2177// SetNodeAssociationStatusToken sets the NodeAssociationStatusToken field's value. 2178func (s *AssociateNodeOutput) SetNodeAssociationStatusToken(v string) *AssociateNodeOutput { 2179 s.NodeAssociationStatusToken = &v 2180 return s 2181} 2182 2183// Describes a single backup. 2184type Backup struct { 2185 _ struct{} `type:"structure"` 2186 2187 // The ARN of the backup. 2188 BackupArn *string `type:"string"` 2189 2190 // The generated ID of the backup. Example: myServerName-yyyyMMddHHmmssSSS 2191 BackupId *string `type:"string"` 2192 2193 // The backup type. Valid values are automated or manual. 2194 BackupType *string `type:"string" enum:"BackupType"` 2195 2196 // The time stamp when the backup was created in the database. Example: 2016-07-29T13:38:47.520Z 2197 CreatedAt *time.Time `type:"timestamp"` 2198 2199 // A user-provided description for a manual backup. This field is empty for 2200 // automated backups. 2201 Description *string `type:"string"` 2202 2203 // The engine type that is obtained from the server when the backup is created. 2204 Engine *string `type:"string"` 2205 2206 // The engine model that is obtained from the server when the backup is created. 2207 EngineModel *string `type:"string"` 2208 2209 // The engine version that is obtained from the server when the backup is created. 2210 EngineVersion *string `type:"string"` 2211 2212 // The EC2 instance profile ARN that is obtained from the server when the backup 2213 // is created. Because this value is stored, you are not required to provide 2214 // the InstanceProfileArn again if you restore a backup. 2215 InstanceProfileArn *string `type:"string"` 2216 2217 // The instance type that is obtained from the server when the backup is created. 2218 InstanceType *string `type:"string"` 2219 2220 // The key pair that is obtained from the server when the backup is created. 2221 KeyPair *string `type:"string"` 2222 2223 // The preferred backup period that is obtained from the server when the backup 2224 // is created. 2225 PreferredBackupWindow *string `type:"string"` 2226 2227 // The preferred maintenance period that is obtained from the server when the 2228 // backup is created. 2229 PreferredMaintenanceWindow *string `type:"string"` 2230 2231 // This field is deprecated and is no longer used. 2232 // 2233 // Deprecated: S3DataSize has been deprecated 2234 S3DataSize *int64 `deprecated:"true" type:"integer"` 2235 2236 // This field is deprecated and is no longer used. 2237 // 2238 // Deprecated: S3DataUrl has been deprecated 2239 S3DataUrl *string `deprecated:"true" type:"string"` 2240 2241 // The Amazon S3 URL of the backup's log file. 2242 S3LogUrl *string `type:"string"` 2243 2244 // The security group IDs that are obtained from the server when the backup 2245 // is created. 2246 SecurityGroupIds []*string `type:"list"` 2247 2248 // The name of the server from which the backup was made. 2249 ServerName *string `min:"1" type:"string"` 2250 2251 // The service role ARN that is obtained from the server when the backup is 2252 // created. 2253 ServiceRoleArn *string `type:"string"` 2254 2255 // The status of a backup while in progress. 2256 Status *string `type:"string" enum:"BackupStatus"` 2257 2258 // An informational message about backup status. 2259 StatusDescription *string `type:"string"` 2260 2261 // The subnet IDs that are obtained from the server when the backup is created. 2262 SubnetIds []*string `type:"list"` 2263 2264 // The version of AWS OpsWorks CM-specific tools that is obtained from the server 2265 // when the backup is created. 2266 ToolsVersion *string `type:"string"` 2267 2268 // The IAM user ARN of the requester for manual backups. This field is empty 2269 // for automated backups. 2270 UserArn *string `type:"string"` 2271} 2272 2273// String returns the string representation 2274func (s Backup) String() string { 2275 return awsutil.Prettify(s) 2276} 2277 2278// GoString returns the string representation 2279func (s Backup) GoString() string { 2280 return s.String() 2281} 2282 2283// SetBackupArn sets the BackupArn field's value. 2284func (s *Backup) SetBackupArn(v string) *Backup { 2285 s.BackupArn = &v 2286 return s 2287} 2288 2289// SetBackupId sets the BackupId field's value. 2290func (s *Backup) SetBackupId(v string) *Backup { 2291 s.BackupId = &v 2292 return s 2293} 2294 2295// SetBackupType sets the BackupType field's value. 2296func (s *Backup) SetBackupType(v string) *Backup { 2297 s.BackupType = &v 2298 return s 2299} 2300 2301// SetCreatedAt sets the CreatedAt field's value. 2302func (s *Backup) SetCreatedAt(v time.Time) *Backup { 2303 s.CreatedAt = &v 2304 return s 2305} 2306 2307// SetDescription sets the Description field's value. 2308func (s *Backup) SetDescription(v string) *Backup { 2309 s.Description = &v 2310 return s 2311} 2312 2313// SetEngine sets the Engine field's value. 2314func (s *Backup) SetEngine(v string) *Backup { 2315 s.Engine = &v 2316 return s 2317} 2318 2319// SetEngineModel sets the EngineModel field's value. 2320func (s *Backup) SetEngineModel(v string) *Backup { 2321 s.EngineModel = &v 2322 return s 2323} 2324 2325// SetEngineVersion sets the EngineVersion field's value. 2326func (s *Backup) SetEngineVersion(v string) *Backup { 2327 s.EngineVersion = &v 2328 return s 2329} 2330 2331// SetInstanceProfileArn sets the InstanceProfileArn field's value. 2332func (s *Backup) SetInstanceProfileArn(v string) *Backup { 2333 s.InstanceProfileArn = &v 2334 return s 2335} 2336 2337// SetInstanceType sets the InstanceType field's value. 2338func (s *Backup) SetInstanceType(v string) *Backup { 2339 s.InstanceType = &v 2340 return s 2341} 2342 2343// SetKeyPair sets the KeyPair field's value. 2344func (s *Backup) SetKeyPair(v string) *Backup { 2345 s.KeyPair = &v 2346 return s 2347} 2348 2349// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. 2350func (s *Backup) SetPreferredBackupWindow(v string) *Backup { 2351 s.PreferredBackupWindow = &v 2352 return s 2353} 2354 2355// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. 2356func (s *Backup) SetPreferredMaintenanceWindow(v string) *Backup { 2357 s.PreferredMaintenanceWindow = &v 2358 return s 2359} 2360 2361// SetS3DataSize sets the S3DataSize field's value. 2362func (s *Backup) SetS3DataSize(v int64) *Backup { 2363 s.S3DataSize = &v 2364 return s 2365} 2366 2367// SetS3DataUrl sets the S3DataUrl field's value. 2368func (s *Backup) SetS3DataUrl(v string) *Backup { 2369 s.S3DataUrl = &v 2370 return s 2371} 2372 2373// SetS3LogUrl sets the S3LogUrl field's value. 2374func (s *Backup) SetS3LogUrl(v string) *Backup { 2375 s.S3LogUrl = &v 2376 return s 2377} 2378 2379// SetSecurityGroupIds sets the SecurityGroupIds field's value. 2380func (s *Backup) SetSecurityGroupIds(v []*string) *Backup { 2381 s.SecurityGroupIds = v 2382 return s 2383} 2384 2385// SetServerName sets the ServerName field's value. 2386func (s *Backup) SetServerName(v string) *Backup { 2387 s.ServerName = &v 2388 return s 2389} 2390 2391// SetServiceRoleArn sets the ServiceRoleArn field's value. 2392func (s *Backup) SetServiceRoleArn(v string) *Backup { 2393 s.ServiceRoleArn = &v 2394 return s 2395} 2396 2397// SetStatus sets the Status field's value. 2398func (s *Backup) SetStatus(v string) *Backup { 2399 s.Status = &v 2400 return s 2401} 2402 2403// SetStatusDescription sets the StatusDescription field's value. 2404func (s *Backup) SetStatusDescription(v string) *Backup { 2405 s.StatusDescription = &v 2406 return s 2407} 2408 2409// SetSubnetIds sets the SubnetIds field's value. 2410func (s *Backup) SetSubnetIds(v []*string) *Backup { 2411 s.SubnetIds = v 2412 return s 2413} 2414 2415// SetToolsVersion sets the ToolsVersion field's value. 2416func (s *Backup) SetToolsVersion(v string) *Backup { 2417 s.ToolsVersion = &v 2418 return s 2419} 2420 2421// SetUserArn sets the UserArn field's value. 2422func (s *Backup) SetUserArn(v string) *Backup { 2423 s.UserArn = &v 2424 return s 2425} 2426 2427type CreateBackupInput struct { 2428 _ struct{} `type:"structure"` 2429 2430 // A user-defined description of the backup. 2431 Description *string `type:"string"` 2432 2433 // The name of the server that you want to back up. 2434 // 2435 // ServerName is a required field 2436 ServerName *string `min:"1" type:"string" required:"true"` 2437 2438 // A map that contains tag keys and tag values to attach to an AWS OpsWorks-CM 2439 // server backup. 2440 // 2441 // * The key cannot be empty. 2442 // 2443 // * The key can be a maximum of 127 characters, and can contain only Unicode 2444 // letters, numbers, or separators, or the following special characters: 2445 // + - = . _ : / 2446 // 2447 // * The value can be a maximum 255 characters, and contain only Unicode 2448 // letters, numbers, or separators, or the following special characters: 2449 // + - = . _ : / 2450 // 2451 // * Leading and trailing white spaces are trimmed from both the key and 2452 // value. 2453 // 2454 // * A maximum of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM 2455 // resources. 2456 Tags []*Tag `type:"list"` 2457} 2458 2459// String returns the string representation 2460func (s CreateBackupInput) String() string { 2461 return awsutil.Prettify(s) 2462} 2463 2464// GoString returns the string representation 2465func (s CreateBackupInput) GoString() string { 2466 return s.String() 2467} 2468 2469// Validate inspects the fields of the type to determine if they are valid. 2470func (s *CreateBackupInput) Validate() error { 2471 invalidParams := request.ErrInvalidParams{Context: "CreateBackupInput"} 2472 if s.ServerName == nil { 2473 invalidParams.Add(request.NewErrParamRequired("ServerName")) 2474 } 2475 if s.ServerName != nil && len(*s.ServerName) < 1 { 2476 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 2477 } 2478 if s.Tags != nil { 2479 for i, v := range s.Tags { 2480 if v == nil { 2481 continue 2482 } 2483 if err := v.Validate(); err != nil { 2484 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2485 } 2486 } 2487 } 2488 2489 if invalidParams.Len() > 0 { 2490 return invalidParams 2491 } 2492 return nil 2493} 2494 2495// SetDescription sets the Description field's value. 2496func (s *CreateBackupInput) SetDescription(v string) *CreateBackupInput { 2497 s.Description = &v 2498 return s 2499} 2500 2501// SetServerName sets the ServerName field's value. 2502func (s *CreateBackupInput) SetServerName(v string) *CreateBackupInput { 2503 s.ServerName = &v 2504 return s 2505} 2506 2507// SetTags sets the Tags field's value. 2508func (s *CreateBackupInput) SetTags(v []*Tag) *CreateBackupInput { 2509 s.Tags = v 2510 return s 2511} 2512 2513type CreateBackupOutput struct { 2514 _ struct{} `type:"structure"` 2515 2516 // Backup created by request. 2517 Backup *Backup `type:"structure"` 2518} 2519 2520// String returns the string representation 2521func (s CreateBackupOutput) String() string { 2522 return awsutil.Prettify(s) 2523} 2524 2525// GoString returns the string representation 2526func (s CreateBackupOutput) GoString() string { 2527 return s.String() 2528} 2529 2530// SetBackup sets the Backup field's value. 2531func (s *CreateBackupOutput) SetBackup(v *Backup) *CreateBackupOutput { 2532 s.Backup = v 2533 return s 2534} 2535 2536type CreateServerInput struct { 2537 _ struct{} `type:"structure"` 2538 2539 // Associate a public IP address with a server that you are launching. Valid 2540 // values are true or false. The default value is true. 2541 AssociatePublicIpAddress *bool `type:"boolean"` 2542 2543 // If you specify this field, AWS OpsWorks CM creates the server by using the 2544 // backup represented by BackupId. 2545 BackupId *string `type:"string"` 2546 2547 // The number of automated backups that you want to keep. Whenever a new backup 2548 // is created, AWS OpsWorks CM deletes the oldest backups if this number is 2549 // exceeded. The default value is 1. 2550 BackupRetentionCount *int64 `min:"1" type:"integer"` 2551 2552 // A PEM-formatted HTTPS certificate. The value can be be a single, self-signed 2553 // certificate, or a certificate chain. If you specify a custom certificate, 2554 // you must also specify values for CustomDomain and CustomPrivateKey. The following 2555 // are requirements for the CustomCertificate value: 2556 // 2557 // * You can provide either a self-signed, custom certificate, or the full 2558 // certificate chain. 2559 // 2560 // * The certificate must be a valid X509 certificate, or a certificate chain 2561 // in PEM format. 2562 // 2563 // * The certificate must be valid at the time of upload. A certificate can't 2564 // be used before its validity period begins (the certificate's NotBefore 2565 // date), or after it expires (the certificate's NotAfter date). 2566 // 2567 // * The certificate’s common name or subject alternative names (SANs), 2568 // if present, must match the value of CustomDomain. 2569 // 2570 // * The certificate must match the value of CustomPrivateKey. 2571 CustomCertificate *string `type:"string"` 2572 2573 // An optional public endpoint of a server, such as https://aws.my-company.com. 2574 // To access the server, create a CNAME DNS record in your preferred DNS service 2575 // that points the custom domain to the endpoint that is generated when the 2576 // server is created (the value of the CreateServer Endpoint attribute). You 2577 // cannot access the server by using the generated Endpoint value if the server 2578 // is using a custom domain. If you specify a custom domain, you must also specify 2579 // values for CustomCertificate and CustomPrivateKey. 2580 CustomDomain *string `type:"string"` 2581 2582 // A private key in PEM format for connecting to the server by using HTTPS. 2583 // The private key must not be encrypted; it cannot be protected by a password 2584 // or passphrase. If you specify a custom private key, you must also specify 2585 // values for CustomDomain and CustomCertificate. 2586 CustomPrivateKey *string `type:"string" sensitive:"true"` 2587 2588 // Enable or disable scheduled backups. Valid values are true or false. The 2589 // default value is true. 2590 DisableAutomatedBackup *bool `type:"boolean"` 2591 2592 // The configuration management engine to use. Valid values include ChefAutomate 2593 // and Puppet. 2594 // 2595 // Engine is a required field 2596 Engine *string `type:"string" required:"true"` 2597 2598 // Optional engine attributes on a specified server. 2599 // 2600 // Attributes accepted in a Chef createServer request: 2601 // 2602 // * CHEF_AUTOMATE_PIVOTAL_KEY: A base64-encoded RSA public key. The corresponding 2603 // private key is required to access the Chef API. When no CHEF_AUTOMATE_PIVOTAL_KEY 2604 // is set, a private key is generated and returned in the response. 2605 // 2606 // * CHEF_AUTOMATE_ADMIN_PASSWORD: The password for the administrative user 2607 // in the Chef Automate web-based dashboard. The password length is a minimum 2608 // of eight characters, and a maximum of 32. The password can contain letters, 2609 // numbers, and special characters (!/@#$%^&+=_). The password must contain 2610 // at least one lower case letter, one upper case letter, one number, and 2611 // one special character. When no CHEF_AUTOMATE_ADMIN_PASSWORD is set, one 2612 // is generated and returned in the response. 2613 // 2614 // Attributes accepted in a Puppet createServer request: 2615 // 2616 // * PUPPET_ADMIN_PASSWORD: To work with the Puppet Enterprise console, a 2617 // password must use ASCII characters. 2618 // 2619 // * PUPPET_R10K_REMOTE: The r10k remote is the URL of your control repository 2620 // (for example, ssh://git@your.git-repo.com:user/control-repo.git). Specifying 2621 // an r10k remote opens TCP port 8170. 2622 // 2623 // * PUPPET_R10K_PRIVATE_KEY: If you are using a private Git repository, 2624 // add PUPPET_R10K_PRIVATE_KEY to specify a PEM-encoded private SSH key. 2625 EngineAttributes []*EngineAttribute `type:"list"` 2626 2627 // The engine model of the server. Valid values in this release include Monolithic 2628 // for Puppet and Single for Chef. 2629 EngineModel *string `type:"string"` 2630 2631 // The major release version of the engine that you want to use. For a Chef 2632 // server, the valid value for EngineVersion is currently 2. For a Puppet server, 2633 // the valid value is 2017. 2634 EngineVersion *string `type:"string"` 2635 2636 // The ARN of the instance profile that your Amazon EC2 instances use. Although 2637 // the AWS OpsWorks console typically creates the instance profile for you, 2638 // if you are using API commands instead, run the service-role-creation.yaml 2639 // AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. 2640 // This template creates a CloudFormation stack that includes the instance profile 2641 // you need. 2642 // 2643 // InstanceProfileArn is a required field 2644 InstanceProfileArn *string `type:"string" required:"true"` 2645 2646 // The Amazon EC2 instance type to use. For example, m5.large. 2647 // 2648 // InstanceType is a required field 2649 InstanceType *string `type:"string" required:"true"` 2650 2651 // The Amazon EC2 key pair to set for the instance. This parameter is optional; 2652 // if desired, you may specify this parameter to connect to your instances by 2653 // using SSH. 2654 KeyPair *string `type:"string"` 2655 2656 // The start time for a one-hour period during which AWS OpsWorks CM backs up 2657 // application-level data on your server if automated backups are enabled. Valid 2658 // values must be specified in one of the following formats: 2659 // 2660 // * HH:MM for daily backups 2661 // 2662 // * DDD:HH:MM for weekly backups 2663 // 2664 // MM must be specified as 00. The specified time is in coordinated universal 2665 // time (UTC). The default value is a random, daily start time. 2666 // 2667 // Example: 08:00, which represents a daily start time of 08:00 UTC. 2668 // 2669 // Example: Mon:08:00, which represents a start time of every Monday at 08:00 2670 // UTC. (8:00 a.m.) 2671 PreferredBackupWindow *string `type:"string"` 2672 2673 // The start time for a one-hour period each week during which AWS OpsWorks 2674 // CM performs maintenance on the instance. Valid values must be specified in 2675 // the following format: DDD:HH:MM. MM must be specified as 00. The specified 2676 // time is in coordinated universal time (UTC). The default value is a random 2677 // one-hour period on Tuesday, Wednesday, or Friday. See TimeWindowDefinition 2678 // for more information. 2679 // 2680 // Example: Mon:08:00, which represents a start time of every Monday at 08:00 2681 // UTC. (8:00 a.m.) 2682 PreferredMaintenanceWindow *string `type:"string"` 2683 2684 // A list of security group IDs to attach to the Amazon EC2 instance. If you 2685 // add this parameter, the specified security groups must be within the VPC 2686 // that is specified by SubnetIds. 2687 // 2688 // If you do not specify this parameter, AWS OpsWorks CM creates one new security 2689 // group that uses TCP ports 22 and 443, open to 0.0.0.0/0 (everyone). 2690 SecurityGroupIds []*string `type:"list"` 2691 2692 // The name of the server. The server name must be unique within your AWS account, 2693 // within each region. Server names must start with a letter; then letters, 2694 // numbers, or hyphens (-) are allowed, up to a maximum of 40 characters. 2695 // 2696 // ServerName is a required field 2697 ServerName *string `min:"1" type:"string" required:"true"` 2698 2699 // The service role that the AWS OpsWorks CM service backend uses to work with 2700 // your account. Although the AWS OpsWorks management console typically creates 2701 // the service role for you, if you are using the AWS CLI or API commands, run 2702 // the service-role-creation.yaml AWS CloudFormation template, located at https://s3.amazonaws.com/opsworks-cm-us-east-1-prod-default-assets/misc/opsworks-cm-roles.yaml. 2703 // This template creates a CloudFormation stack that includes the service role 2704 // and instance profile that you need. 2705 // 2706 // ServiceRoleArn is a required field 2707 ServiceRoleArn *string `type:"string" required:"true"` 2708 2709 // The IDs of subnets in which to launch the server EC2 instance. 2710 // 2711 // Amazon EC2-Classic customers: This field is required. All servers must run 2712 // within a VPC. The VPC must have "Auto Assign Public IP" enabled. 2713 // 2714 // EC2-VPC customers: This field is optional. If you do not specify subnet IDs, 2715 // your EC2 instances are created in a default subnet that is selected by Amazon 2716 // EC2. If you specify subnet IDs, the VPC must have "Auto Assign Public IP" 2717 // enabled. 2718 // 2719 // For more information about supported Amazon EC2 platforms, see Supported 2720 // Platforms (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-supported-platforms.html). 2721 SubnetIds []*string `type:"list"` 2722 2723 // A map that contains tag keys and tag values to attach to an AWS OpsWorks 2724 // for Chef Automate or AWS OpsWorks for Puppet Enterprise server. 2725 // 2726 // * The key cannot be empty. 2727 // 2728 // * The key can be a maximum of 127 characters, and can contain only Unicode 2729 // letters, numbers, or separators, or the following special characters: 2730 // + - = . _ : / @ 2731 // 2732 // * The value can be a maximum 255 characters, and contain only Unicode 2733 // letters, numbers, or separators, or the following special characters: 2734 // + - = . _ : / @ 2735 // 2736 // * Leading and trailing white spaces are trimmed from both the key and 2737 // value. 2738 // 2739 // * A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM 2740 // server. 2741 Tags []*Tag `type:"list"` 2742} 2743 2744// String returns the string representation 2745func (s CreateServerInput) String() string { 2746 return awsutil.Prettify(s) 2747} 2748 2749// GoString returns the string representation 2750func (s CreateServerInput) GoString() string { 2751 return s.String() 2752} 2753 2754// Validate inspects the fields of the type to determine if they are valid. 2755func (s *CreateServerInput) Validate() error { 2756 invalidParams := request.ErrInvalidParams{Context: "CreateServerInput"} 2757 if s.BackupRetentionCount != nil && *s.BackupRetentionCount < 1 { 2758 invalidParams.Add(request.NewErrParamMinValue("BackupRetentionCount", 1)) 2759 } 2760 if s.Engine == nil { 2761 invalidParams.Add(request.NewErrParamRequired("Engine")) 2762 } 2763 if s.InstanceProfileArn == nil { 2764 invalidParams.Add(request.NewErrParamRequired("InstanceProfileArn")) 2765 } 2766 if s.InstanceType == nil { 2767 invalidParams.Add(request.NewErrParamRequired("InstanceType")) 2768 } 2769 if s.ServerName == nil { 2770 invalidParams.Add(request.NewErrParamRequired("ServerName")) 2771 } 2772 if s.ServerName != nil && len(*s.ServerName) < 1 { 2773 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 2774 } 2775 if s.ServiceRoleArn == nil { 2776 invalidParams.Add(request.NewErrParamRequired("ServiceRoleArn")) 2777 } 2778 if s.Tags != nil { 2779 for i, v := range s.Tags { 2780 if v == nil { 2781 continue 2782 } 2783 if err := v.Validate(); err != nil { 2784 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2785 } 2786 } 2787 } 2788 2789 if invalidParams.Len() > 0 { 2790 return invalidParams 2791 } 2792 return nil 2793} 2794 2795// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. 2796func (s *CreateServerInput) SetAssociatePublicIpAddress(v bool) *CreateServerInput { 2797 s.AssociatePublicIpAddress = &v 2798 return s 2799} 2800 2801// SetBackupId sets the BackupId field's value. 2802func (s *CreateServerInput) SetBackupId(v string) *CreateServerInput { 2803 s.BackupId = &v 2804 return s 2805} 2806 2807// SetBackupRetentionCount sets the BackupRetentionCount field's value. 2808func (s *CreateServerInput) SetBackupRetentionCount(v int64) *CreateServerInput { 2809 s.BackupRetentionCount = &v 2810 return s 2811} 2812 2813// SetCustomCertificate sets the CustomCertificate field's value. 2814func (s *CreateServerInput) SetCustomCertificate(v string) *CreateServerInput { 2815 s.CustomCertificate = &v 2816 return s 2817} 2818 2819// SetCustomDomain sets the CustomDomain field's value. 2820func (s *CreateServerInput) SetCustomDomain(v string) *CreateServerInput { 2821 s.CustomDomain = &v 2822 return s 2823} 2824 2825// SetCustomPrivateKey sets the CustomPrivateKey field's value. 2826func (s *CreateServerInput) SetCustomPrivateKey(v string) *CreateServerInput { 2827 s.CustomPrivateKey = &v 2828 return s 2829} 2830 2831// SetDisableAutomatedBackup sets the DisableAutomatedBackup field's value. 2832func (s *CreateServerInput) SetDisableAutomatedBackup(v bool) *CreateServerInput { 2833 s.DisableAutomatedBackup = &v 2834 return s 2835} 2836 2837// SetEngine sets the Engine field's value. 2838func (s *CreateServerInput) SetEngine(v string) *CreateServerInput { 2839 s.Engine = &v 2840 return s 2841} 2842 2843// SetEngineAttributes sets the EngineAttributes field's value. 2844func (s *CreateServerInput) SetEngineAttributes(v []*EngineAttribute) *CreateServerInput { 2845 s.EngineAttributes = v 2846 return s 2847} 2848 2849// SetEngineModel sets the EngineModel field's value. 2850func (s *CreateServerInput) SetEngineModel(v string) *CreateServerInput { 2851 s.EngineModel = &v 2852 return s 2853} 2854 2855// SetEngineVersion sets the EngineVersion field's value. 2856func (s *CreateServerInput) SetEngineVersion(v string) *CreateServerInput { 2857 s.EngineVersion = &v 2858 return s 2859} 2860 2861// SetInstanceProfileArn sets the InstanceProfileArn field's value. 2862func (s *CreateServerInput) SetInstanceProfileArn(v string) *CreateServerInput { 2863 s.InstanceProfileArn = &v 2864 return s 2865} 2866 2867// SetInstanceType sets the InstanceType field's value. 2868func (s *CreateServerInput) SetInstanceType(v string) *CreateServerInput { 2869 s.InstanceType = &v 2870 return s 2871} 2872 2873// SetKeyPair sets the KeyPair field's value. 2874func (s *CreateServerInput) SetKeyPair(v string) *CreateServerInput { 2875 s.KeyPair = &v 2876 return s 2877} 2878 2879// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. 2880func (s *CreateServerInput) SetPreferredBackupWindow(v string) *CreateServerInput { 2881 s.PreferredBackupWindow = &v 2882 return s 2883} 2884 2885// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. 2886func (s *CreateServerInput) SetPreferredMaintenanceWindow(v string) *CreateServerInput { 2887 s.PreferredMaintenanceWindow = &v 2888 return s 2889} 2890 2891// SetSecurityGroupIds sets the SecurityGroupIds field's value. 2892func (s *CreateServerInput) SetSecurityGroupIds(v []*string) *CreateServerInput { 2893 s.SecurityGroupIds = v 2894 return s 2895} 2896 2897// SetServerName sets the ServerName field's value. 2898func (s *CreateServerInput) SetServerName(v string) *CreateServerInput { 2899 s.ServerName = &v 2900 return s 2901} 2902 2903// SetServiceRoleArn sets the ServiceRoleArn field's value. 2904func (s *CreateServerInput) SetServiceRoleArn(v string) *CreateServerInput { 2905 s.ServiceRoleArn = &v 2906 return s 2907} 2908 2909// SetSubnetIds sets the SubnetIds field's value. 2910func (s *CreateServerInput) SetSubnetIds(v []*string) *CreateServerInput { 2911 s.SubnetIds = v 2912 return s 2913} 2914 2915// SetTags sets the Tags field's value. 2916func (s *CreateServerInput) SetTags(v []*Tag) *CreateServerInput { 2917 s.Tags = v 2918 return s 2919} 2920 2921type CreateServerOutput struct { 2922 _ struct{} `type:"structure"` 2923 2924 // The server that is created by the request. 2925 Server *Server `type:"structure"` 2926} 2927 2928// String returns the string representation 2929func (s CreateServerOutput) String() string { 2930 return awsutil.Prettify(s) 2931} 2932 2933// GoString returns the string representation 2934func (s CreateServerOutput) GoString() string { 2935 return s.String() 2936} 2937 2938// SetServer sets the Server field's value. 2939func (s *CreateServerOutput) SetServer(v *Server) *CreateServerOutput { 2940 s.Server = v 2941 return s 2942} 2943 2944type DeleteBackupInput struct { 2945 _ struct{} `type:"structure"` 2946 2947 // The ID of the backup to delete. Run the DescribeBackups command to get a 2948 // list of backup IDs. Backup IDs are in the format ServerName-yyyyMMddHHmmssSSS. 2949 // 2950 // BackupId is a required field 2951 BackupId *string `type:"string" required:"true"` 2952} 2953 2954// String returns the string representation 2955func (s DeleteBackupInput) String() string { 2956 return awsutil.Prettify(s) 2957} 2958 2959// GoString returns the string representation 2960func (s DeleteBackupInput) GoString() string { 2961 return s.String() 2962} 2963 2964// Validate inspects the fields of the type to determine if they are valid. 2965func (s *DeleteBackupInput) Validate() error { 2966 invalidParams := request.ErrInvalidParams{Context: "DeleteBackupInput"} 2967 if s.BackupId == nil { 2968 invalidParams.Add(request.NewErrParamRequired("BackupId")) 2969 } 2970 2971 if invalidParams.Len() > 0 { 2972 return invalidParams 2973 } 2974 return nil 2975} 2976 2977// SetBackupId sets the BackupId field's value. 2978func (s *DeleteBackupInput) SetBackupId(v string) *DeleteBackupInput { 2979 s.BackupId = &v 2980 return s 2981} 2982 2983type DeleteBackupOutput struct { 2984 _ struct{} `type:"structure"` 2985} 2986 2987// String returns the string representation 2988func (s DeleteBackupOutput) String() string { 2989 return awsutil.Prettify(s) 2990} 2991 2992// GoString returns the string representation 2993func (s DeleteBackupOutput) GoString() string { 2994 return s.String() 2995} 2996 2997type DeleteServerInput struct { 2998 _ struct{} `type:"structure"` 2999 3000 // The ID of the server to delete. 3001 // 3002 // ServerName is a required field 3003 ServerName *string `min:"1" type:"string" required:"true"` 3004} 3005 3006// String returns the string representation 3007func (s DeleteServerInput) String() string { 3008 return awsutil.Prettify(s) 3009} 3010 3011// GoString returns the string representation 3012func (s DeleteServerInput) GoString() string { 3013 return s.String() 3014} 3015 3016// Validate inspects the fields of the type to determine if they are valid. 3017func (s *DeleteServerInput) Validate() error { 3018 invalidParams := request.ErrInvalidParams{Context: "DeleteServerInput"} 3019 if s.ServerName == nil { 3020 invalidParams.Add(request.NewErrParamRequired("ServerName")) 3021 } 3022 if s.ServerName != nil && len(*s.ServerName) < 1 { 3023 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3024 } 3025 3026 if invalidParams.Len() > 0 { 3027 return invalidParams 3028 } 3029 return nil 3030} 3031 3032// SetServerName sets the ServerName field's value. 3033func (s *DeleteServerInput) SetServerName(v string) *DeleteServerInput { 3034 s.ServerName = &v 3035 return s 3036} 3037 3038type DeleteServerOutput struct { 3039 _ struct{} `type:"structure"` 3040} 3041 3042// String returns the string representation 3043func (s DeleteServerOutput) String() string { 3044 return awsutil.Prettify(s) 3045} 3046 3047// GoString returns the string representation 3048func (s DeleteServerOutput) GoString() string { 3049 return s.String() 3050} 3051 3052type DescribeAccountAttributesInput struct { 3053 _ struct{} `type:"structure"` 3054} 3055 3056// String returns the string representation 3057func (s DescribeAccountAttributesInput) String() string { 3058 return awsutil.Prettify(s) 3059} 3060 3061// GoString returns the string representation 3062func (s DescribeAccountAttributesInput) GoString() string { 3063 return s.String() 3064} 3065 3066type DescribeAccountAttributesOutput struct { 3067 _ struct{} `type:"structure"` 3068 3069 // The attributes that are currently set for the account. 3070 Attributes []*AccountAttribute `type:"list"` 3071} 3072 3073// String returns the string representation 3074func (s DescribeAccountAttributesOutput) String() string { 3075 return awsutil.Prettify(s) 3076} 3077 3078// GoString returns the string representation 3079func (s DescribeAccountAttributesOutput) GoString() string { 3080 return s.String() 3081} 3082 3083// SetAttributes sets the Attributes field's value. 3084func (s *DescribeAccountAttributesOutput) SetAttributes(v []*AccountAttribute) *DescribeAccountAttributesOutput { 3085 s.Attributes = v 3086 return s 3087} 3088 3089type DescribeBackupsInput struct { 3090 _ struct{} `type:"structure"` 3091 3092 // Describes a single backup. 3093 BackupId *string `type:"string"` 3094 3095 // This is not currently implemented for DescribeBackups requests. 3096 MaxResults *int64 `min:"1" type:"integer"` 3097 3098 // This is not currently implemented for DescribeBackups requests. 3099 NextToken *string `type:"string"` 3100 3101 // Returns backups for the server with the specified ServerName. 3102 ServerName *string `min:"1" type:"string"` 3103} 3104 3105// String returns the string representation 3106func (s DescribeBackupsInput) String() string { 3107 return awsutil.Prettify(s) 3108} 3109 3110// GoString returns the string representation 3111func (s DescribeBackupsInput) GoString() string { 3112 return s.String() 3113} 3114 3115// Validate inspects the fields of the type to determine if they are valid. 3116func (s *DescribeBackupsInput) Validate() error { 3117 invalidParams := request.ErrInvalidParams{Context: "DescribeBackupsInput"} 3118 if s.MaxResults != nil && *s.MaxResults < 1 { 3119 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3120 } 3121 if s.ServerName != nil && len(*s.ServerName) < 1 { 3122 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3123 } 3124 3125 if invalidParams.Len() > 0 { 3126 return invalidParams 3127 } 3128 return nil 3129} 3130 3131// SetBackupId sets the BackupId field's value. 3132func (s *DescribeBackupsInput) SetBackupId(v string) *DescribeBackupsInput { 3133 s.BackupId = &v 3134 return s 3135} 3136 3137// SetMaxResults sets the MaxResults field's value. 3138func (s *DescribeBackupsInput) SetMaxResults(v int64) *DescribeBackupsInput { 3139 s.MaxResults = &v 3140 return s 3141} 3142 3143// SetNextToken sets the NextToken field's value. 3144func (s *DescribeBackupsInput) SetNextToken(v string) *DescribeBackupsInput { 3145 s.NextToken = &v 3146 return s 3147} 3148 3149// SetServerName sets the ServerName field's value. 3150func (s *DescribeBackupsInput) SetServerName(v string) *DescribeBackupsInput { 3151 s.ServerName = &v 3152 return s 3153} 3154 3155type DescribeBackupsOutput struct { 3156 _ struct{} `type:"structure"` 3157 3158 // Contains the response to a DescribeBackups request. 3159 Backups []*Backup `type:"list"` 3160 3161 // This is not currently implemented for DescribeBackups requests. 3162 NextToken *string `type:"string"` 3163} 3164 3165// String returns the string representation 3166func (s DescribeBackupsOutput) String() string { 3167 return awsutil.Prettify(s) 3168} 3169 3170// GoString returns the string representation 3171func (s DescribeBackupsOutput) GoString() string { 3172 return s.String() 3173} 3174 3175// SetBackups sets the Backups field's value. 3176func (s *DescribeBackupsOutput) SetBackups(v []*Backup) *DescribeBackupsOutput { 3177 s.Backups = v 3178 return s 3179} 3180 3181// SetNextToken sets the NextToken field's value. 3182func (s *DescribeBackupsOutput) SetNextToken(v string) *DescribeBackupsOutput { 3183 s.NextToken = &v 3184 return s 3185} 3186 3187type DescribeEventsInput struct { 3188 _ struct{} `type:"structure"` 3189 3190 // To receive a paginated response, use this parameter to specify the maximum 3191 // number of results to be returned with a single call. If the number of available 3192 // results exceeds this maximum, the response includes a NextToken value that 3193 // you can assign to the NextToken request parameter to get the next set of 3194 // results. 3195 MaxResults *int64 `min:"1" type:"integer"` 3196 3197 // NextToken is a string that is returned in some command responses. It indicates 3198 // that not all entries have been returned, and that you must run at least one 3199 // more request to get remaining items. To get remaining results, call DescribeEvents 3200 // again, and assign the token from the previous results as the value of the 3201 // nextToken parameter. If there are no more results, the response object's 3202 // nextToken parameter value is null. Setting a nextToken value that was not 3203 // returned in your previous results causes an InvalidNextTokenException to 3204 // occur. 3205 NextToken *string `type:"string"` 3206 3207 // The name of the server for which you want to view events. 3208 // 3209 // ServerName is a required field 3210 ServerName *string `min:"1" type:"string" required:"true"` 3211} 3212 3213// String returns the string representation 3214func (s DescribeEventsInput) String() string { 3215 return awsutil.Prettify(s) 3216} 3217 3218// GoString returns the string representation 3219func (s DescribeEventsInput) GoString() string { 3220 return s.String() 3221} 3222 3223// Validate inspects the fields of the type to determine if they are valid. 3224func (s *DescribeEventsInput) Validate() error { 3225 invalidParams := request.ErrInvalidParams{Context: "DescribeEventsInput"} 3226 if s.MaxResults != nil && *s.MaxResults < 1 { 3227 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3228 } 3229 if s.ServerName == nil { 3230 invalidParams.Add(request.NewErrParamRequired("ServerName")) 3231 } 3232 if s.ServerName != nil && len(*s.ServerName) < 1 { 3233 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3234 } 3235 3236 if invalidParams.Len() > 0 { 3237 return invalidParams 3238 } 3239 return nil 3240} 3241 3242// SetMaxResults sets the MaxResults field's value. 3243func (s *DescribeEventsInput) SetMaxResults(v int64) *DescribeEventsInput { 3244 s.MaxResults = &v 3245 return s 3246} 3247 3248// SetNextToken sets the NextToken field's value. 3249func (s *DescribeEventsInput) SetNextToken(v string) *DescribeEventsInput { 3250 s.NextToken = &v 3251 return s 3252} 3253 3254// SetServerName sets the ServerName field's value. 3255func (s *DescribeEventsInput) SetServerName(v string) *DescribeEventsInput { 3256 s.ServerName = &v 3257 return s 3258} 3259 3260type DescribeEventsOutput struct { 3261 _ struct{} `type:"structure"` 3262 3263 // NextToken is a string that is returned in some command responses. It indicates 3264 // that not all entries have been returned, and that you must run at least one 3265 // more request to get remaining items. To get remaining results, call DescribeEvents 3266 // again, and assign the token from the previous results as the value of the 3267 // nextToken parameter. If there are no more results, the response object's 3268 // nextToken parameter value is null. Setting a nextToken value that was not 3269 // returned in your previous results causes an InvalidNextTokenException to 3270 // occur. 3271 NextToken *string `type:"string"` 3272 3273 // Contains the response to a DescribeEvents request. 3274 ServerEvents []*ServerEvent `type:"list"` 3275} 3276 3277// String returns the string representation 3278func (s DescribeEventsOutput) String() string { 3279 return awsutil.Prettify(s) 3280} 3281 3282// GoString returns the string representation 3283func (s DescribeEventsOutput) GoString() string { 3284 return s.String() 3285} 3286 3287// SetNextToken sets the NextToken field's value. 3288func (s *DescribeEventsOutput) SetNextToken(v string) *DescribeEventsOutput { 3289 s.NextToken = &v 3290 return s 3291} 3292 3293// SetServerEvents sets the ServerEvents field's value. 3294func (s *DescribeEventsOutput) SetServerEvents(v []*ServerEvent) *DescribeEventsOutput { 3295 s.ServerEvents = v 3296 return s 3297} 3298 3299type DescribeNodeAssociationStatusInput struct { 3300 _ struct{} `type:"structure"` 3301 3302 // The token returned in either the AssociateNodeResponse or the DisassociateNodeResponse. 3303 // 3304 // NodeAssociationStatusToken is a required field 3305 NodeAssociationStatusToken *string `type:"string" required:"true"` 3306 3307 // The name of the server from which to disassociate the node. 3308 // 3309 // ServerName is a required field 3310 ServerName *string `min:"1" type:"string" required:"true"` 3311} 3312 3313// String returns the string representation 3314func (s DescribeNodeAssociationStatusInput) String() string { 3315 return awsutil.Prettify(s) 3316} 3317 3318// GoString returns the string representation 3319func (s DescribeNodeAssociationStatusInput) GoString() string { 3320 return s.String() 3321} 3322 3323// Validate inspects the fields of the type to determine if they are valid. 3324func (s *DescribeNodeAssociationStatusInput) Validate() error { 3325 invalidParams := request.ErrInvalidParams{Context: "DescribeNodeAssociationStatusInput"} 3326 if s.NodeAssociationStatusToken == nil { 3327 invalidParams.Add(request.NewErrParamRequired("NodeAssociationStatusToken")) 3328 } 3329 if s.ServerName == nil { 3330 invalidParams.Add(request.NewErrParamRequired("ServerName")) 3331 } 3332 if s.ServerName != nil && len(*s.ServerName) < 1 { 3333 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3334 } 3335 3336 if invalidParams.Len() > 0 { 3337 return invalidParams 3338 } 3339 return nil 3340} 3341 3342// SetNodeAssociationStatusToken sets the NodeAssociationStatusToken field's value. 3343func (s *DescribeNodeAssociationStatusInput) SetNodeAssociationStatusToken(v string) *DescribeNodeAssociationStatusInput { 3344 s.NodeAssociationStatusToken = &v 3345 return s 3346} 3347 3348// SetServerName sets the ServerName field's value. 3349func (s *DescribeNodeAssociationStatusInput) SetServerName(v string) *DescribeNodeAssociationStatusInput { 3350 s.ServerName = &v 3351 return s 3352} 3353 3354type DescribeNodeAssociationStatusOutput struct { 3355 _ struct{} `type:"structure"` 3356 3357 // Attributes specific to the node association. In Puppet, the attibute PUPPET_NODE_CERT 3358 // contains the signed certificate (the result of the CSR). 3359 EngineAttributes []*EngineAttribute `type:"list"` 3360 3361 // The status of the association or disassociation request. 3362 // 3363 // Possible values: 3364 // 3365 // * SUCCESS: The association or disassociation succeeded. 3366 // 3367 // * FAILED: The association or disassociation failed. 3368 // 3369 // * IN_PROGRESS: The association or disassociation is still in progress. 3370 NodeAssociationStatus *string `type:"string" enum:"NodeAssociationStatus"` 3371} 3372 3373// String returns the string representation 3374func (s DescribeNodeAssociationStatusOutput) String() string { 3375 return awsutil.Prettify(s) 3376} 3377 3378// GoString returns the string representation 3379func (s DescribeNodeAssociationStatusOutput) GoString() string { 3380 return s.String() 3381} 3382 3383// SetEngineAttributes sets the EngineAttributes field's value. 3384func (s *DescribeNodeAssociationStatusOutput) SetEngineAttributes(v []*EngineAttribute) *DescribeNodeAssociationStatusOutput { 3385 s.EngineAttributes = v 3386 return s 3387} 3388 3389// SetNodeAssociationStatus sets the NodeAssociationStatus field's value. 3390func (s *DescribeNodeAssociationStatusOutput) SetNodeAssociationStatus(v string) *DescribeNodeAssociationStatusOutput { 3391 s.NodeAssociationStatus = &v 3392 return s 3393} 3394 3395type DescribeServersInput struct { 3396 _ struct{} `type:"structure"` 3397 3398 // This is not currently implemented for DescribeServers requests. 3399 MaxResults *int64 `min:"1" type:"integer"` 3400 3401 // This is not currently implemented for DescribeServers requests. 3402 NextToken *string `type:"string"` 3403 3404 // Describes the server with the specified ServerName. 3405 ServerName *string `min:"1" type:"string"` 3406} 3407 3408// String returns the string representation 3409func (s DescribeServersInput) String() string { 3410 return awsutil.Prettify(s) 3411} 3412 3413// GoString returns the string representation 3414func (s DescribeServersInput) GoString() string { 3415 return s.String() 3416} 3417 3418// Validate inspects the fields of the type to determine if they are valid. 3419func (s *DescribeServersInput) Validate() error { 3420 invalidParams := request.ErrInvalidParams{Context: "DescribeServersInput"} 3421 if s.MaxResults != nil && *s.MaxResults < 1 { 3422 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3423 } 3424 if s.ServerName != nil && len(*s.ServerName) < 1 { 3425 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3426 } 3427 3428 if invalidParams.Len() > 0 { 3429 return invalidParams 3430 } 3431 return nil 3432} 3433 3434// SetMaxResults sets the MaxResults field's value. 3435func (s *DescribeServersInput) SetMaxResults(v int64) *DescribeServersInput { 3436 s.MaxResults = &v 3437 return s 3438} 3439 3440// SetNextToken sets the NextToken field's value. 3441func (s *DescribeServersInput) SetNextToken(v string) *DescribeServersInput { 3442 s.NextToken = &v 3443 return s 3444} 3445 3446// SetServerName sets the ServerName field's value. 3447func (s *DescribeServersInput) SetServerName(v string) *DescribeServersInput { 3448 s.ServerName = &v 3449 return s 3450} 3451 3452type DescribeServersOutput struct { 3453 _ struct{} `type:"structure"` 3454 3455 // This is not currently implemented for DescribeServers requests. 3456 NextToken *string `type:"string"` 3457 3458 // Contains the response to a DescribeServers request. 3459 // 3460 // For Chef Automate servers: If DescribeServersResponse$Servers$EngineAttributes 3461 // includes CHEF_MAJOR_UPGRADE_AVAILABLE, you can upgrade the Chef Automate 3462 // server to Chef Automate 2. To be eligible for upgrade, a server running Chef 3463 // Automate 1 must have had at least one successful maintenance run after November 3464 // 1, 2019. 3465 // 3466 // For Puppet Server: DescribeServersResponse$Servers$EngineAttributes contains 3467 // PUPPET_API_CA_CERT. This is the PEM-encoded CA certificate that is used by 3468 // the Puppet API over TCP port number 8140. The CA certificate is also used 3469 // to sign node certificates. 3470 Servers []*Server `type:"list"` 3471} 3472 3473// String returns the string representation 3474func (s DescribeServersOutput) String() string { 3475 return awsutil.Prettify(s) 3476} 3477 3478// GoString returns the string representation 3479func (s DescribeServersOutput) GoString() string { 3480 return s.String() 3481} 3482 3483// SetNextToken sets the NextToken field's value. 3484func (s *DescribeServersOutput) SetNextToken(v string) *DescribeServersOutput { 3485 s.NextToken = &v 3486 return s 3487} 3488 3489// SetServers sets the Servers field's value. 3490func (s *DescribeServersOutput) SetServers(v []*Server) *DescribeServersOutput { 3491 s.Servers = v 3492 return s 3493} 3494 3495type DisassociateNodeInput struct { 3496 _ struct{} `type:"structure"` 3497 3498 // Engine attributes that are used for disassociating the node. No attributes 3499 // are required for Puppet. 3500 // 3501 // Attributes required in a DisassociateNode request for Chef 3502 // 3503 // * CHEF_ORGANIZATION: The Chef organization with which the node was associated. 3504 // By default only one organization named default can exist. 3505 EngineAttributes []*EngineAttribute `type:"list"` 3506 3507 // The name of the client node. 3508 // 3509 // NodeName is a required field 3510 NodeName *string `type:"string" required:"true"` 3511 3512 // The name of the server from which to disassociate the node. 3513 // 3514 // ServerName is a required field 3515 ServerName *string `min:"1" type:"string" required:"true"` 3516} 3517 3518// String returns the string representation 3519func (s DisassociateNodeInput) String() string { 3520 return awsutil.Prettify(s) 3521} 3522 3523// GoString returns the string representation 3524func (s DisassociateNodeInput) GoString() string { 3525 return s.String() 3526} 3527 3528// Validate inspects the fields of the type to determine if they are valid. 3529func (s *DisassociateNodeInput) Validate() error { 3530 invalidParams := request.ErrInvalidParams{Context: "DisassociateNodeInput"} 3531 if s.NodeName == nil { 3532 invalidParams.Add(request.NewErrParamRequired("NodeName")) 3533 } 3534 if s.ServerName == nil { 3535 invalidParams.Add(request.NewErrParamRequired("ServerName")) 3536 } 3537 if s.ServerName != nil && len(*s.ServerName) < 1 { 3538 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3539 } 3540 3541 if invalidParams.Len() > 0 { 3542 return invalidParams 3543 } 3544 return nil 3545} 3546 3547// SetEngineAttributes sets the EngineAttributes field's value. 3548func (s *DisassociateNodeInput) SetEngineAttributes(v []*EngineAttribute) *DisassociateNodeInput { 3549 s.EngineAttributes = v 3550 return s 3551} 3552 3553// SetNodeName sets the NodeName field's value. 3554func (s *DisassociateNodeInput) SetNodeName(v string) *DisassociateNodeInput { 3555 s.NodeName = &v 3556 return s 3557} 3558 3559// SetServerName sets the ServerName field's value. 3560func (s *DisassociateNodeInput) SetServerName(v string) *DisassociateNodeInput { 3561 s.ServerName = &v 3562 return s 3563} 3564 3565type DisassociateNodeOutput struct { 3566 _ struct{} `type:"structure"` 3567 3568 // Contains a token which can be passed to the DescribeNodeAssociationStatus 3569 // API call to get the status of the disassociation request. 3570 NodeAssociationStatusToken *string `type:"string"` 3571} 3572 3573// String returns the string representation 3574func (s DisassociateNodeOutput) String() string { 3575 return awsutil.Prettify(s) 3576} 3577 3578// GoString returns the string representation 3579func (s DisassociateNodeOutput) GoString() string { 3580 return s.String() 3581} 3582 3583// SetNodeAssociationStatusToken sets the NodeAssociationStatusToken field's value. 3584func (s *DisassociateNodeOutput) SetNodeAssociationStatusToken(v string) *DisassociateNodeOutput { 3585 s.NodeAssociationStatusToken = &v 3586 return s 3587} 3588 3589// A name and value pair that is specific to the engine of the server. 3590type EngineAttribute struct { 3591 _ struct{} `type:"structure"` 3592 3593 // The name of the engine attribute. 3594 Name *string `type:"string"` 3595 3596 // The value of the engine attribute. 3597 Value *string `type:"string" sensitive:"true"` 3598} 3599 3600// String returns the string representation 3601func (s EngineAttribute) String() string { 3602 return awsutil.Prettify(s) 3603} 3604 3605// GoString returns the string representation 3606func (s EngineAttribute) GoString() string { 3607 return s.String() 3608} 3609 3610// SetName sets the Name field's value. 3611func (s *EngineAttribute) SetName(v string) *EngineAttribute { 3612 s.Name = &v 3613 return s 3614} 3615 3616// SetValue sets the Value field's value. 3617func (s *EngineAttribute) SetValue(v string) *EngineAttribute { 3618 s.Value = &v 3619 return s 3620} 3621 3622type ExportServerEngineAttributeInput struct { 3623 _ struct{} `type:"structure"` 3624 3625 // The name of the export attribute. Currently, the supported export attribute 3626 // is Userdata. This exports a user data script that includes parameters and 3627 // values provided in the InputAttributes list. 3628 // 3629 // ExportAttributeName is a required field 3630 ExportAttributeName *string `type:"string" required:"true"` 3631 3632 // The list of engine attributes. The list type is EngineAttribute. An EngineAttribute 3633 // list item is a pair that includes an attribute name and its value. For the 3634 // Userdata ExportAttributeName, the following are supported engine attribute 3635 // names. 3636 // 3637 // * RunList In Chef, a list of roles or recipes that are run in the specified 3638 // order. In Puppet, this parameter is ignored. 3639 // 3640 // * OrganizationName In Chef, an organization name. AWS OpsWorks for Chef 3641 // Automate always creates the organization default. In Puppet, this parameter 3642 // is ignored. 3643 // 3644 // * NodeEnvironment In Chef, a node environment (for example, development, 3645 // staging, or one-box). In Puppet, this parameter is ignored. 3646 // 3647 // * NodeClientVersion In Chef, the version of the Chef engine (three numbers 3648 // separated by dots, such as 13.8.5). If this attribute is empty, OpsWorks 3649 // for Chef Automate uses the most current version. In Puppet, this parameter 3650 // is ignored. 3651 InputAttributes []*EngineAttribute `type:"list"` 3652 3653 // The name of the server from which you are exporting the attribute. 3654 // 3655 // ServerName is a required field 3656 ServerName *string `min:"1" type:"string" required:"true"` 3657} 3658 3659// String returns the string representation 3660func (s ExportServerEngineAttributeInput) String() string { 3661 return awsutil.Prettify(s) 3662} 3663 3664// GoString returns the string representation 3665func (s ExportServerEngineAttributeInput) GoString() string { 3666 return s.String() 3667} 3668 3669// Validate inspects the fields of the type to determine if they are valid. 3670func (s *ExportServerEngineAttributeInput) Validate() error { 3671 invalidParams := request.ErrInvalidParams{Context: "ExportServerEngineAttributeInput"} 3672 if s.ExportAttributeName == nil { 3673 invalidParams.Add(request.NewErrParamRequired("ExportAttributeName")) 3674 } 3675 if s.ServerName == nil { 3676 invalidParams.Add(request.NewErrParamRequired("ServerName")) 3677 } 3678 if s.ServerName != nil && len(*s.ServerName) < 1 { 3679 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 3680 } 3681 3682 if invalidParams.Len() > 0 { 3683 return invalidParams 3684 } 3685 return nil 3686} 3687 3688// SetExportAttributeName sets the ExportAttributeName field's value. 3689func (s *ExportServerEngineAttributeInput) SetExportAttributeName(v string) *ExportServerEngineAttributeInput { 3690 s.ExportAttributeName = &v 3691 return s 3692} 3693 3694// SetInputAttributes sets the InputAttributes field's value. 3695func (s *ExportServerEngineAttributeInput) SetInputAttributes(v []*EngineAttribute) *ExportServerEngineAttributeInput { 3696 s.InputAttributes = v 3697 return s 3698} 3699 3700// SetServerName sets the ServerName field's value. 3701func (s *ExportServerEngineAttributeInput) SetServerName(v string) *ExportServerEngineAttributeInput { 3702 s.ServerName = &v 3703 return s 3704} 3705 3706type ExportServerEngineAttributeOutput struct { 3707 _ struct{} `type:"structure"` 3708 3709 // The requested engine attribute pair with attribute name and value. 3710 EngineAttribute *EngineAttribute `type:"structure"` 3711 3712 // The server name used in the request. 3713 ServerName *string `min:"1" type:"string"` 3714} 3715 3716// String returns the string representation 3717func (s ExportServerEngineAttributeOutput) String() string { 3718 return awsutil.Prettify(s) 3719} 3720 3721// GoString returns the string representation 3722func (s ExportServerEngineAttributeOutput) GoString() string { 3723 return s.String() 3724} 3725 3726// SetEngineAttribute sets the EngineAttribute field's value. 3727func (s *ExportServerEngineAttributeOutput) SetEngineAttribute(v *EngineAttribute) *ExportServerEngineAttributeOutput { 3728 s.EngineAttribute = v 3729 return s 3730} 3731 3732// SetServerName sets the ServerName field's value. 3733func (s *ExportServerEngineAttributeOutput) SetServerName(v string) *ExportServerEngineAttributeOutput { 3734 s.ServerName = &v 3735 return s 3736} 3737 3738// This occurs when the provided nextToken is not valid. 3739type InvalidNextTokenException struct { 3740 _ struct{} `type:"structure"` 3741 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3742 3743 // Error or informational message that can contain more detail about a nextToken 3744 // failure. 3745 Message_ *string `locationName:"Message" type:"string"` 3746} 3747 3748// String returns the string representation 3749func (s InvalidNextTokenException) String() string { 3750 return awsutil.Prettify(s) 3751} 3752 3753// GoString returns the string representation 3754func (s InvalidNextTokenException) GoString() string { 3755 return s.String() 3756} 3757 3758func newErrorInvalidNextTokenException(v protocol.ResponseMetadata) error { 3759 return &InvalidNextTokenException{ 3760 RespMetadata: v, 3761 } 3762} 3763 3764// Code returns the exception type name. 3765func (s *InvalidNextTokenException) Code() string { 3766 return "InvalidNextTokenException" 3767} 3768 3769// Message returns the exception's message. 3770func (s *InvalidNextTokenException) Message() string { 3771 if s.Message_ != nil { 3772 return *s.Message_ 3773 } 3774 return "" 3775} 3776 3777// OrigErr always returns nil, satisfies awserr.Error interface. 3778func (s *InvalidNextTokenException) OrigErr() error { 3779 return nil 3780} 3781 3782func (s *InvalidNextTokenException) Error() string { 3783 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3784} 3785 3786// Status code returns the HTTP status code for the request's response error. 3787func (s *InvalidNextTokenException) StatusCode() int { 3788 return s.RespMetadata.StatusCode 3789} 3790 3791// RequestID returns the service's response RequestID for request. 3792func (s *InvalidNextTokenException) RequestID() string { 3793 return s.RespMetadata.RequestID 3794} 3795 3796// The resource is in a state that does not allow you to perform a specified 3797// action. 3798type InvalidStateException struct { 3799 _ struct{} `type:"structure"` 3800 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3801 3802 // Error or informational message that provides more detail if a resource is 3803 // in a state that is not valid for performing a specified action. 3804 Message_ *string `locationName:"Message" type:"string"` 3805} 3806 3807// String returns the string representation 3808func (s InvalidStateException) String() string { 3809 return awsutil.Prettify(s) 3810} 3811 3812// GoString returns the string representation 3813func (s InvalidStateException) GoString() string { 3814 return s.String() 3815} 3816 3817func newErrorInvalidStateException(v protocol.ResponseMetadata) error { 3818 return &InvalidStateException{ 3819 RespMetadata: v, 3820 } 3821} 3822 3823// Code returns the exception type name. 3824func (s *InvalidStateException) Code() string { 3825 return "InvalidStateException" 3826} 3827 3828// Message returns the exception's message. 3829func (s *InvalidStateException) Message() string { 3830 if s.Message_ != nil { 3831 return *s.Message_ 3832 } 3833 return "" 3834} 3835 3836// OrigErr always returns nil, satisfies awserr.Error interface. 3837func (s *InvalidStateException) OrigErr() error { 3838 return nil 3839} 3840 3841func (s *InvalidStateException) Error() string { 3842 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3843} 3844 3845// Status code returns the HTTP status code for the request's response error. 3846func (s *InvalidStateException) StatusCode() int { 3847 return s.RespMetadata.StatusCode 3848} 3849 3850// RequestID returns the service's response RequestID for request. 3851func (s *InvalidStateException) RequestID() string { 3852 return s.RespMetadata.RequestID 3853} 3854 3855// The limit of servers or backups has been reached. 3856type LimitExceededException struct { 3857 _ struct{} `type:"structure"` 3858 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3859 3860 // Error or informational message that the maximum allowed number of servers 3861 // or backups has been exceeded. 3862 Message_ *string `locationName:"Message" type:"string"` 3863} 3864 3865// String returns the string representation 3866func (s LimitExceededException) String() string { 3867 return awsutil.Prettify(s) 3868} 3869 3870// GoString returns the string representation 3871func (s LimitExceededException) GoString() string { 3872 return s.String() 3873} 3874 3875func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3876 return &LimitExceededException{ 3877 RespMetadata: v, 3878 } 3879} 3880 3881// Code returns the exception type name. 3882func (s *LimitExceededException) Code() string { 3883 return "LimitExceededException" 3884} 3885 3886// Message returns the exception's message. 3887func (s *LimitExceededException) Message() string { 3888 if s.Message_ != nil { 3889 return *s.Message_ 3890 } 3891 return "" 3892} 3893 3894// OrigErr always returns nil, satisfies awserr.Error interface. 3895func (s *LimitExceededException) OrigErr() error { 3896 return nil 3897} 3898 3899func (s *LimitExceededException) Error() string { 3900 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3901} 3902 3903// Status code returns the HTTP status code for the request's response error. 3904func (s *LimitExceededException) StatusCode() int { 3905 return s.RespMetadata.StatusCode 3906} 3907 3908// RequestID returns the service's response RequestID for request. 3909func (s *LimitExceededException) RequestID() string { 3910 return s.RespMetadata.RequestID 3911} 3912 3913type ListTagsForResourceInput struct { 3914 _ struct{} `type:"structure"` 3915 3916 // To receive a paginated response, use this parameter to specify the maximum 3917 // number of results to be returned with a single call. If the number of available 3918 // results exceeds this maximum, the response includes a NextToken value that 3919 // you can assign to the NextToken request parameter to get the next set of 3920 // results. 3921 MaxResults *int64 `min:"1" type:"integer"` 3922 3923 // NextToken is a string that is returned in some command responses. It indicates 3924 // that not all entries have been returned, and that you must run at least one 3925 // more request to get remaining items. To get remaining results, call ListTagsForResource 3926 // again, and assign the token from the previous results as the value of the 3927 // nextToken parameter. If there are no more results, the response object's 3928 // nextToken parameter value is null. Setting a nextToken value that was not 3929 // returned in your previous results causes an InvalidNextTokenException to 3930 // occur. 3931 NextToken *string `type:"string"` 3932 3933 // The Amazon Resource Number (ARN) of an AWS OpsWorks for Chef Automate or 3934 // AWS OpsWorks for Puppet Enterprise server for which you want to show applied 3935 // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. 3936 // 3937 // ResourceArn is a required field 3938 ResourceArn *string `type:"string" required:"true"` 3939} 3940 3941// String returns the string representation 3942func (s ListTagsForResourceInput) String() string { 3943 return awsutil.Prettify(s) 3944} 3945 3946// GoString returns the string representation 3947func (s ListTagsForResourceInput) GoString() string { 3948 return s.String() 3949} 3950 3951// Validate inspects the fields of the type to determine if they are valid. 3952func (s *ListTagsForResourceInput) Validate() error { 3953 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3954 if s.MaxResults != nil && *s.MaxResults < 1 { 3955 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3956 } 3957 if s.ResourceArn == nil { 3958 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3959 } 3960 3961 if invalidParams.Len() > 0 { 3962 return invalidParams 3963 } 3964 return nil 3965} 3966 3967// SetMaxResults sets the MaxResults field's value. 3968func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { 3969 s.MaxResults = &v 3970 return s 3971} 3972 3973// SetNextToken sets the NextToken field's value. 3974func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { 3975 s.NextToken = &v 3976 return s 3977} 3978 3979// SetResourceArn sets the ResourceArn field's value. 3980func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 3981 s.ResourceArn = &v 3982 return s 3983} 3984 3985type ListTagsForResourceOutput struct { 3986 _ struct{} `type:"structure"` 3987 3988 // A token that you can use as the value of NextToken in subsequent calls to 3989 // the API to show more results. 3990 NextToken *string `type:"string"` 3991 3992 // Tags that have been applied to the resource. 3993 Tags []*Tag `type:"list"` 3994} 3995 3996// String returns the string representation 3997func (s ListTagsForResourceOutput) String() string { 3998 return awsutil.Prettify(s) 3999} 4000 4001// GoString returns the string representation 4002func (s ListTagsForResourceOutput) GoString() string { 4003 return s.String() 4004} 4005 4006// SetNextToken sets the NextToken field's value. 4007func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { 4008 s.NextToken = &v 4009 return s 4010} 4011 4012// SetTags sets the Tags field's value. 4013func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 4014 s.Tags = v 4015 return s 4016} 4017 4018// The requested resource cannot be created because it already exists. 4019type ResourceAlreadyExistsException struct { 4020 _ struct{} `type:"structure"` 4021 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4022 4023 // Error or informational message in response to a CreateServer request that 4024 // a resource cannot be created because it already exists. 4025 Message_ *string `locationName:"Message" type:"string"` 4026} 4027 4028// String returns the string representation 4029func (s ResourceAlreadyExistsException) String() string { 4030 return awsutil.Prettify(s) 4031} 4032 4033// GoString returns the string representation 4034func (s ResourceAlreadyExistsException) GoString() string { 4035 return s.String() 4036} 4037 4038func newErrorResourceAlreadyExistsException(v protocol.ResponseMetadata) error { 4039 return &ResourceAlreadyExistsException{ 4040 RespMetadata: v, 4041 } 4042} 4043 4044// Code returns the exception type name. 4045func (s *ResourceAlreadyExistsException) Code() string { 4046 return "ResourceAlreadyExistsException" 4047} 4048 4049// Message returns the exception's message. 4050func (s *ResourceAlreadyExistsException) Message() string { 4051 if s.Message_ != nil { 4052 return *s.Message_ 4053 } 4054 return "" 4055} 4056 4057// OrigErr always returns nil, satisfies awserr.Error interface. 4058func (s *ResourceAlreadyExistsException) OrigErr() error { 4059 return nil 4060} 4061 4062func (s *ResourceAlreadyExistsException) Error() string { 4063 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4064} 4065 4066// Status code returns the HTTP status code for the request's response error. 4067func (s *ResourceAlreadyExistsException) StatusCode() int { 4068 return s.RespMetadata.StatusCode 4069} 4070 4071// RequestID returns the service's response RequestID for request. 4072func (s *ResourceAlreadyExistsException) RequestID() string { 4073 return s.RespMetadata.RequestID 4074} 4075 4076// The requested resource does not exist, or access was denied. 4077type ResourceNotFoundException struct { 4078 _ struct{} `type:"structure"` 4079 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4080 4081 // Error or informational message that can contain more detail about problems 4082 // locating or accessing a resource. 4083 Message_ *string `locationName:"Message" type:"string"` 4084} 4085 4086// String returns the string representation 4087func (s ResourceNotFoundException) String() string { 4088 return awsutil.Prettify(s) 4089} 4090 4091// GoString returns the string representation 4092func (s ResourceNotFoundException) GoString() string { 4093 return s.String() 4094} 4095 4096func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4097 return &ResourceNotFoundException{ 4098 RespMetadata: v, 4099 } 4100} 4101 4102// Code returns the exception type name. 4103func (s *ResourceNotFoundException) Code() string { 4104 return "ResourceNotFoundException" 4105} 4106 4107// Message returns the exception's message. 4108func (s *ResourceNotFoundException) Message() string { 4109 if s.Message_ != nil { 4110 return *s.Message_ 4111 } 4112 return "" 4113} 4114 4115// OrigErr always returns nil, satisfies awserr.Error interface. 4116func (s *ResourceNotFoundException) OrigErr() error { 4117 return nil 4118} 4119 4120func (s *ResourceNotFoundException) Error() string { 4121 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4122} 4123 4124// Status code returns the HTTP status code for the request's response error. 4125func (s *ResourceNotFoundException) StatusCode() int { 4126 return s.RespMetadata.StatusCode 4127} 4128 4129// RequestID returns the service's response RequestID for request. 4130func (s *ResourceNotFoundException) RequestID() string { 4131 return s.RespMetadata.RequestID 4132} 4133 4134type RestoreServerInput struct { 4135 _ struct{} `type:"structure"` 4136 4137 // The ID of the backup that you want to use to restore a server. 4138 // 4139 // BackupId is a required field 4140 BackupId *string `type:"string" required:"true"` 4141 4142 // The type of instance to restore. Valid values must be specified in the following 4143 // format: ^([cm][34]|t2).* For example, m5.large. Valid values are m5.large, 4144 // r5.xlarge, and r5.2xlarge. If you do not specify this parameter, RestoreServer 4145 // uses the instance type from the specified backup. 4146 InstanceType *string `type:"string"` 4147 4148 // The name of the key pair to set on the new EC2 instance. This can be helpful 4149 // if the administrator no longer has the SSH key. 4150 KeyPair *string `type:"string"` 4151 4152 // The name of the server that you want to restore. 4153 // 4154 // ServerName is a required field 4155 ServerName *string `min:"1" type:"string" required:"true"` 4156} 4157 4158// String returns the string representation 4159func (s RestoreServerInput) String() string { 4160 return awsutil.Prettify(s) 4161} 4162 4163// GoString returns the string representation 4164func (s RestoreServerInput) GoString() string { 4165 return s.String() 4166} 4167 4168// Validate inspects the fields of the type to determine if they are valid. 4169func (s *RestoreServerInput) Validate() error { 4170 invalidParams := request.ErrInvalidParams{Context: "RestoreServerInput"} 4171 if s.BackupId == nil { 4172 invalidParams.Add(request.NewErrParamRequired("BackupId")) 4173 } 4174 if s.ServerName == nil { 4175 invalidParams.Add(request.NewErrParamRequired("ServerName")) 4176 } 4177 if s.ServerName != nil && len(*s.ServerName) < 1 { 4178 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 4179 } 4180 4181 if invalidParams.Len() > 0 { 4182 return invalidParams 4183 } 4184 return nil 4185} 4186 4187// SetBackupId sets the BackupId field's value. 4188func (s *RestoreServerInput) SetBackupId(v string) *RestoreServerInput { 4189 s.BackupId = &v 4190 return s 4191} 4192 4193// SetInstanceType sets the InstanceType field's value. 4194func (s *RestoreServerInput) SetInstanceType(v string) *RestoreServerInput { 4195 s.InstanceType = &v 4196 return s 4197} 4198 4199// SetKeyPair sets the KeyPair field's value. 4200func (s *RestoreServerInput) SetKeyPair(v string) *RestoreServerInput { 4201 s.KeyPair = &v 4202 return s 4203} 4204 4205// SetServerName sets the ServerName field's value. 4206func (s *RestoreServerInput) SetServerName(v string) *RestoreServerInput { 4207 s.ServerName = &v 4208 return s 4209} 4210 4211type RestoreServerOutput struct { 4212 _ struct{} `type:"structure"` 4213} 4214 4215// String returns the string representation 4216func (s RestoreServerOutput) String() string { 4217 return awsutil.Prettify(s) 4218} 4219 4220// GoString returns the string representation 4221func (s RestoreServerOutput) GoString() string { 4222 return s.String() 4223} 4224 4225// Describes a configuration management server. 4226type Server struct { 4227 _ struct{} `type:"structure"` 4228 4229 // Associate a public IP address with a server that you are launching. 4230 AssociatePublicIpAddress *bool `type:"boolean"` 4231 4232 // The number of automated backups to keep. 4233 BackupRetentionCount *int64 `type:"integer"` 4234 4235 // The ARN of the CloudFormation stack that was used to create the server. 4236 CloudFormationStackArn *string `type:"string"` 4237 4238 // Time stamp of server creation. Example 2016-07-29T13:38:47.520Z 4239 CreatedAt *time.Time `type:"timestamp"` 4240 4241 // An optional public endpoint of a server, such as https://aws.my-company.com. 4242 // You cannot access the server by using the Endpoint value if the server has 4243 // a CustomDomain specified. 4244 CustomDomain *string `type:"string"` 4245 4246 // Disables automated backups. The number of stored backups is dependent on 4247 // the value of PreferredBackupCount. 4248 DisableAutomatedBackup *bool `type:"boolean"` 4249 4250 // A DNS name that can be used to access the engine. Example: myserver-asdfghjkl.us-east-1.opsworks.io. 4251 // You cannot access the server by using the Endpoint value if the server has 4252 // a CustomDomain specified. 4253 Endpoint *string `type:"string"` 4254 4255 // The engine type of the server. Valid values in this release include ChefAutomate 4256 // and Puppet. 4257 Engine *string `type:"string"` 4258 4259 // The response of a createServer() request returns the master credential to 4260 // access the server in EngineAttributes. These credentials are not stored by 4261 // AWS OpsWorks CM; they are returned only as part of the result of createServer(). 4262 // 4263 // Attributes returned in a createServer response for Chef 4264 // 4265 // * CHEF_AUTOMATE_PIVOTAL_KEY: A base64-encoded RSA private key that is 4266 // generated by AWS OpsWorks for Chef Automate. This private key is required 4267 // to access the Chef API. 4268 // 4269 // * CHEF_STARTER_KIT: A base64-encoded ZIP file. The ZIP file contains a 4270 // Chef starter kit, which includes a README, a configuration file, and the 4271 // required RSA private key. Save this file, unzip it, and then change to 4272 // the directory where you've unzipped the file contents. From this directory, 4273 // you can run Knife commands. 4274 // 4275 // Attributes returned in a createServer response for Puppet 4276 // 4277 // * PUPPET_STARTER_KIT: A base64-encoded ZIP file. The ZIP file contains 4278 // a Puppet starter kit, including a README and a required private key. Save 4279 // this file, unzip it, and then change to the directory where you've unzipped 4280 // the file contents. 4281 // 4282 // * PUPPET_ADMIN_PASSWORD: An administrator password that you can use to 4283 // sign in to the Puppet Enterprise console after the server is online. 4284 EngineAttributes []*EngineAttribute `type:"list"` 4285 4286 // The engine model of the server. Valid values in this release include Monolithic 4287 // for Puppet and Single for Chef. 4288 EngineModel *string `type:"string"` 4289 4290 // The engine version of the server. For a Chef server, the valid value for 4291 // EngineVersion is currently 2. For a Puppet server, the valid value is 2017. 4292 EngineVersion *string `type:"string"` 4293 4294 // The instance profile ARN of the server. 4295 InstanceProfileArn *string `type:"string"` 4296 4297 // The instance type for the server, as specified in the CloudFormation stack. 4298 // This might not be the same instance type that is shown in the EC2 console. 4299 InstanceType *string `type:"string"` 4300 4301 // The key pair associated with the server. 4302 KeyPair *string `type:"string"` 4303 4304 // The status of the most recent server maintenance run. Shows SUCCESS or FAILED. 4305 MaintenanceStatus *string `type:"string" enum:"MaintenanceStatus"` 4306 4307 // The preferred backup period specified for the server. 4308 PreferredBackupWindow *string `type:"string"` 4309 4310 // The preferred maintenance period specified for the server. 4311 PreferredMaintenanceWindow *string `type:"string"` 4312 4313 // The security group IDs for the server, as specified in the CloudFormation 4314 // stack. These might not be the same security groups that are shown in the 4315 // EC2 console. 4316 SecurityGroupIds []*string `type:"list"` 4317 4318 // The ARN of the server. 4319 ServerArn *string `type:"string"` 4320 4321 // The name of the server. 4322 ServerName *string `type:"string"` 4323 4324 // The service role ARN used to create the server. 4325 ServiceRoleArn *string `type:"string"` 4326 4327 // The server's status. This field displays the states of actions in progress, 4328 // such as creating, running, or backing up the server, as well as the server's 4329 // health state. 4330 Status *string `type:"string" enum:"ServerStatus"` 4331 4332 // Depending on the server status, this field has either a human-readable message 4333 // (such as a create or backup error), or an escaped block of JSON (used for 4334 // health check results). 4335 StatusReason *string `type:"string"` 4336 4337 // The subnet IDs specified in a CreateServer request. 4338 SubnetIds []*string `type:"list"` 4339} 4340 4341// String returns the string representation 4342func (s Server) String() string { 4343 return awsutil.Prettify(s) 4344} 4345 4346// GoString returns the string representation 4347func (s Server) GoString() string { 4348 return s.String() 4349} 4350 4351// SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value. 4352func (s *Server) SetAssociatePublicIpAddress(v bool) *Server { 4353 s.AssociatePublicIpAddress = &v 4354 return s 4355} 4356 4357// SetBackupRetentionCount sets the BackupRetentionCount field's value. 4358func (s *Server) SetBackupRetentionCount(v int64) *Server { 4359 s.BackupRetentionCount = &v 4360 return s 4361} 4362 4363// SetCloudFormationStackArn sets the CloudFormationStackArn field's value. 4364func (s *Server) SetCloudFormationStackArn(v string) *Server { 4365 s.CloudFormationStackArn = &v 4366 return s 4367} 4368 4369// SetCreatedAt sets the CreatedAt field's value. 4370func (s *Server) SetCreatedAt(v time.Time) *Server { 4371 s.CreatedAt = &v 4372 return s 4373} 4374 4375// SetCustomDomain sets the CustomDomain field's value. 4376func (s *Server) SetCustomDomain(v string) *Server { 4377 s.CustomDomain = &v 4378 return s 4379} 4380 4381// SetDisableAutomatedBackup sets the DisableAutomatedBackup field's value. 4382func (s *Server) SetDisableAutomatedBackup(v bool) *Server { 4383 s.DisableAutomatedBackup = &v 4384 return s 4385} 4386 4387// SetEndpoint sets the Endpoint field's value. 4388func (s *Server) SetEndpoint(v string) *Server { 4389 s.Endpoint = &v 4390 return s 4391} 4392 4393// SetEngine sets the Engine field's value. 4394func (s *Server) SetEngine(v string) *Server { 4395 s.Engine = &v 4396 return s 4397} 4398 4399// SetEngineAttributes sets the EngineAttributes field's value. 4400func (s *Server) SetEngineAttributes(v []*EngineAttribute) *Server { 4401 s.EngineAttributes = v 4402 return s 4403} 4404 4405// SetEngineModel sets the EngineModel field's value. 4406func (s *Server) SetEngineModel(v string) *Server { 4407 s.EngineModel = &v 4408 return s 4409} 4410 4411// SetEngineVersion sets the EngineVersion field's value. 4412func (s *Server) SetEngineVersion(v string) *Server { 4413 s.EngineVersion = &v 4414 return s 4415} 4416 4417// SetInstanceProfileArn sets the InstanceProfileArn field's value. 4418func (s *Server) SetInstanceProfileArn(v string) *Server { 4419 s.InstanceProfileArn = &v 4420 return s 4421} 4422 4423// SetInstanceType sets the InstanceType field's value. 4424func (s *Server) SetInstanceType(v string) *Server { 4425 s.InstanceType = &v 4426 return s 4427} 4428 4429// SetKeyPair sets the KeyPair field's value. 4430func (s *Server) SetKeyPair(v string) *Server { 4431 s.KeyPair = &v 4432 return s 4433} 4434 4435// SetMaintenanceStatus sets the MaintenanceStatus field's value. 4436func (s *Server) SetMaintenanceStatus(v string) *Server { 4437 s.MaintenanceStatus = &v 4438 return s 4439} 4440 4441// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. 4442func (s *Server) SetPreferredBackupWindow(v string) *Server { 4443 s.PreferredBackupWindow = &v 4444 return s 4445} 4446 4447// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. 4448func (s *Server) SetPreferredMaintenanceWindow(v string) *Server { 4449 s.PreferredMaintenanceWindow = &v 4450 return s 4451} 4452 4453// SetSecurityGroupIds sets the SecurityGroupIds field's value. 4454func (s *Server) SetSecurityGroupIds(v []*string) *Server { 4455 s.SecurityGroupIds = v 4456 return s 4457} 4458 4459// SetServerArn sets the ServerArn field's value. 4460func (s *Server) SetServerArn(v string) *Server { 4461 s.ServerArn = &v 4462 return s 4463} 4464 4465// SetServerName sets the ServerName field's value. 4466func (s *Server) SetServerName(v string) *Server { 4467 s.ServerName = &v 4468 return s 4469} 4470 4471// SetServiceRoleArn sets the ServiceRoleArn field's value. 4472func (s *Server) SetServiceRoleArn(v string) *Server { 4473 s.ServiceRoleArn = &v 4474 return s 4475} 4476 4477// SetStatus sets the Status field's value. 4478func (s *Server) SetStatus(v string) *Server { 4479 s.Status = &v 4480 return s 4481} 4482 4483// SetStatusReason sets the StatusReason field's value. 4484func (s *Server) SetStatusReason(v string) *Server { 4485 s.StatusReason = &v 4486 return s 4487} 4488 4489// SetSubnetIds sets the SubnetIds field's value. 4490func (s *Server) SetSubnetIds(v []*string) *Server { 4491 s.SubnetIds = v 4492 return s 4493} 4494 4495// An event that is related to the server, such as the start of maintenance 4496// or backup. 4497type ServerEvent struct { 4498 _ struct{} `type:"structure"` 4499 4500 // The time when the event occurred. 4501 CreatedAt *time.Time `type:"timestamp"` 4502 4503 // The Amazon S3 URL of the event's log file. 4504 LogUrl *string `type:"string"` 4505 4506 // A human-readable informational or status message. 4507 Message *string `type:"string"` 4508 4509 // The name of the server on or for which the event occurred. 4510 ServerName *string `type:"string"` 4511} 4512 4513// String returns the string representation 4514func (s ServerEvent) String() string { 4515 return awsutil.Prettify(s) 4516} 4517 4518// GoString returns the string representation 4519func (s ServerEvent) GoString() string { 4520 return s.String() 4521} 4522 4523// SetCreatedAt sets the CreatedAt field's value. 4524func (s *ServerEvent) SetCreatedAt(v time.Time) *ServerEvent { 4525 s.CreatedAt = &v 4526 return s 4527} 4528 4529// SetLogUrl sets the LogUrl field's value. 4530func (s *ServerEvent) SetLogUrl(v string) *ServerEvent { 4531 s.LogUrl = &v 4532 return s 4533} 4534 4535// SetMessage sets the Message field's value. 4536func (s *ServerEvent) SetMessage(v string) *ServerEvent { 4537 s.Message = &v 4538 return s 4539} 4540 4541// SetServerName sets the ServerName field's value. 4542func (s *ServerEvent) SetServerName(v string) *ServerEvent { 4543 s.ServerName = &v 4544 return s 4545} 4546 4547type StartMaintenanceInput struct { 4548 _ struct{} `type:"structure"` 4549 4550 // Engine attributes that are specific to the server on which you want to run 4551 // maintenance. 4552 // 4553 // Attributes accepted in a StartMaintenance request for Chef 4554 // 4555 // * CHEF_MAJOR_UPGRADE: If a Chef Automate server is eligible for upgrade 4556 // to Chef Automate 2, add this engine attribute to a StartMaintenance request 4557 // and set the value to true to upgrade the server to Chef Automate 2. For 4558 // more information, see Upgrade an AWS OpsWorks for Chef Automate Server 4559 // to Chef Automate 2 (https://docs.aws.amazon.com/opsworks/latest/userguide/opscm-a2upgrade.html). 4560 EngineAttributes []*EngineAttribute `type:"list"` 4561 4562 // The name of the server on which to run maintenance. 4563 // 4564 // ServerName is a required field 4565 ServerName *string `min:"1" type:"string" required:"true"` 4566} 4567 4568// String returns the string representation 4569func (s StartMaintenanceInput) String() string { 4570 return awsutil.Prettify(s) 4571} 4572 4573// GoString returns the string representation 4574func (s StartMaintenanceInput) GoString() string { 4575 return s.String() 4576} 4577 4578// Validate inspects the fields of the type to determine if they are valid. 4579func (s *StartMaintenanceInput) Validate() error { 4580 invalidParams := request.ErrInvalidParams{Context: "StartMaintenanceInput"} 4581 if s.ServerName == nil { 4582 invalidParams.Add(request.NewErrParamRequired("ServerName")) 4583 } 4584 if s.ServerName != nil && len(*s.ServerName) < 1 { 4585 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 4586 } 4587 4588 if invalidParams.Len() > 0 { 4589 return invalidParams 4590 } 4591 return nil 4592} 4593 4594// SetEngineAttributes sets the EngineAttributes field's value. 4595func (s *StartMaintenanceInput) SetEngineAttributes(v []*EngineAttribute) *StartMaintenanceInput { 4596 s.EngineAttributes = v 4597 return s 4598} 4599 4600// SetServerName sets the ServerName field's value. 4601func (s *StartMaintenanceInput) SetServerName(v string) *StartMaintenanceInput { 4602 s.ServerName = &v 4603 return s 4604} 4605 4606type StartMaintenanceOutput struct { 4607 _ struct{} `type:"structure"` 4608 4609 // Contains the response to a StartMaintenance request. 4610 Server *Server `type:"structure"` 4611} 4612 4613// String returns the string representation 4614func (s StartMaintenanceOutput) String() string { 4615 return awsutil.Prettify(s) 4616} 4617 4618// GoString returns the string representation 4619func (s StartMaintenanceOutput) GoString() string { 4620 return s.String() 4621} 4622 4623// SetServer sets the Server field's value. 4624func (s *StartMaintenanceOutput) SetServer(v *Server) *StartMaintenanceOutput { 4625 s.Server = v 4626 return s 4627} 4628 4629// A map that contains tag keys and tag values to attach to an AWS OpsWorks 4630// for Chef Automate or AWS OpsWorks for Puppet Enterprise server. Leading and 4631// trailing white spaces are trimmed from both the key and value. A maximum 4632// of 50 user-applied tags is allowed for tag-supported AWS OpsWorks-CM resources. 4633type Tag struct { 4634 _ struct{} `type:"structure"` 4635 4636 // A tag key, such as Stage or Name. A tag key cannot be empty. The key can 4637 // be a maximum of 127 characters, and can contain only Unicode letters, numbers, 4638 // or separators, or the following special characters: + - = . _ : / 4639 // 4640 // Key is a required field 4641 Key *string `min:"1" type:"string" required:"true"` 4642 4643 // An optional tag value, such as Production or test-owcm-server. The value 4644 // can be a maximum of 255 characters, and contain only Unicode letters, numbers, 4645 // or separators, or the following special characters: + - = . _ : / 4646 // 4647 // Value is a required field 4648 Value *string `type:"string" required:"true"` 4649} 4650 4651// String returns the string representation 4652func (s Tag) String() string { 4653 return awsutil.Prettify(s) 4654} 4655 4656// GoString returns the string representation 4657func (s Tag) GoString() string { 4658 return s.String() 4659} 4660 4661// Validate inspects the fields of the type to determine if they are valid. 4662func (s *Tag) Validate() error { 4663 invalidParams := request.ErrInvalidParams{Context: "Tag"} 4664 if s.Key == nil { 4665 invalidParams.Add(request.NewErrParamRequired("Key")) 4666 } 4667 if s.Key != nil && len(*s.Key) < 1 { 4668 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4669 } 4670 if s.Value == nil { 4671 invalidParams.Add(request.NewErrParamRequired("Value")) 4672 } 4673 4674 if invalidParams.Len() > 0 { 4675 return invalidParams 4676 } 4677 return nil 4678} 4679 4680// SetKey sets the Key field's value. 4681func (s *Tag) SetKey(v string) *Tag { 4682 s.Key = &v 4683 return s 4684} 4685 4686// SetValue sets the Value field's value. 4687func (s *Tag) SetValue(v string) *Tag { 4688 s.Value = &v 4689 return s 4690} 4691 4692type TagResourceInput struct { 4693 _ struct{} `type:"structure"` 4694 4695 // The Amazon Resource Number (ARN) of a resource to which you want to apply 4696 // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. 4697 // 4698 // ResourceArn is a required field 4699 ResourceArn *string `type:"string" required:"true"` 4700 4701 // A map that contains tag keys and tag values to attach to AWS OpsWorks-CM 4702 // servers or backups. 4703 // 4704 // * The key cannot be empty. 4705 // 4706 // * The key can be a maximum of 127 characters, and can contain only Unicode 4707 // letters, numbers, or separators, or the following special characters: 4708 // + - = . _ : / 4709 // 4710 // * The value can be a maximum 255 characters, and contain only Unicode 4711 // letters, numbers, or separators, or the following special characters: 4712 // + - = . _ : / 4713 // 4714 // * Leading and trailing white spaces are trimmed from both the key and 4715 // value. 4716 // 4717 // * A maximum of 50 user-applied tags is allowed for any AWS OpsWorks-CM 4718 // server or backup. 4719 // 4720 // Tags is a required field 4721 Tags []*Tag `type:"list" required:"true"` 4722} 4723 4724// String returns the string representation 4725func (s TagResourceInput) String() string { 4726 return awsutil.Prettify(s) 4727} 4728 4729// GoString returns the string representation 4730func (s TagResourceInput) GoString() string { 4731 return s.String() 4732} 4733 4734// Validate inspects the fields of the type to determine if they are valid. 4735func (s *TagResourceInput) Validate() error { 4736 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4737 if s.ResourceArn == nil { 4738 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4739 } 4740 if s.Tags == nil { 4741 invalidParams.Add(request.NewErrParamRequired("Tags")) 4742 } 4743 if s.Tags != nil { 4744 for i, v := range s.Tags { 4745 if v == nil { 4746 continue 4747 } 4748 if err := v.Validate(); err != nil { 4749 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 4750 } 4751 } 4752 } 4753 4754 if invalidParams.Len() > 0 { 4755 return invalidParams 4756 } 4757 return nil 4758} 4759 4760// SetResourceArn sets the ResourceArn field's value. 4761func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 4762 s.ResourceArn = &v 4763 return s 4764} 4765 4766// SetTags sets the Tags field's value. 4767func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 4768 s.Tags = v 4769 return s 4770} 4771 4772type TagResourceOutput struct { 4773 _ struct{} `type:"structure"` 4774} 4775 4776// String returns the string representation 4777func (s TagResourceOutput) String() string { 4778 return awsutil.Prettify(s) 4779} 4780 4781// GoString returns the string representation 4782func (s TagResourceOutput) GoString() string { 4783 return s.String() 4784} 4785 4786type UntagResourceInput struct { 4787 _ struct{} `type:"structure"` 4788 4789 // The Amazon Resource Number (ARN) of a resource from which you want to remove 4790 // tags. For example, arn:aws:opsworks-cm:us-west-2:123456789012:server/test-owcm-server/EXAMPLE-66b0-4196-8274-d1a2bEXAMPLE. 4791 // 4792 // ResourceArn is a required field 4793 ResourceArn *string `type:"string" required:"true"` 4794 4795 // The keys of tags that you want to remove. 4796 // 4797 // TagKeys is a required field 4798 TagKeys []*string `type:"list" required:"true"` 4799} 4800 4801// String returns the string representation 4802func (s UntagResourceInput) String() string { 4803 return awsutil.Prettify(s) 4804} 4805 4806// GoString returns the string representation 4807func (s UntagResourceInput) GoString() string { 4808 return s.String() 4809} 4810 4811// Validate inspects the fields of the type to determine if they are valid. 4812func (s *UntagResourceInput) Validate() error { 4813 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4814 if s.ResourceArn == nil { 4815 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4816 } 4817 if s.TagKeys == nil { 4818 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4819 } 4820 4821 if invalidParams.Len() > 0 { 4822 return invalidParams 4823 } 4824 return nil 4825} 4826 4827// SetResourceArn sets the ResourceArn field's value. 4828func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 4829 s.ResourceArn = &v 4830 return s 4831} 4832 4833// SetTagKeys sets the TagKeys field's value. 4834func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4835 s.TagKeys = v 4836 return s 4837} 4838 4839type UntagResourceOutput struct { 4840 _ struct{} `type:"structure"` 4841} 4842 4843// String returns the string representation 4844func (s UntagResourceOutput) String() string { 4845 return awsutil.Prettify(s) 4846} 4847 4848// GoString returns the string representation 4849func (s UntagResourceOutput) GoString() string { 4850 return s.String() 4851} 4852 4853type UpdateServerEngineAttributesInput struct { 4854 _ struct{} `type:"structure"` 4855 4856 // The name of the engine attribute to update. 4857 // 4858 // AttributeName is a required field 4859 AttributeName *string `min:"1" type:"string" required:"true"` 4860 4861 // The value to set for the attribute. 4862 AttributeValue *string `type:"string"` 4863 4864 // The name of the server to update. 4865 // 4866 // ServerName is a required field 4867 ServerName *string `min:"1" type:"string" required:"true"` 4868} 4869 4870// String returns the string representation 4871func (s UpdateServerEngineAttributesInput) String() string { 4872 return awsutil.Prettify(s) 4873} 4874 4875// GoString returns the string representation 4876func (s UpdateServerEngineAttributesInput) GoString() string { 4877 return s.String() 4878} 4879 4880// Validate inspects the fields of the type to determine if they are valid. 4881func (s *UpdateServerEngineAttributesInput) Validate() error { 4882 invalidParams := request.ErrInvalidParams{Context: "UpdateServerEngineAttributesInput"} 4883 if s.AttributeName == nil { 4884 invalidParams.Add(request.NewErrParamRequired("AttributeName")) 4885 } 4886 if s.AttributeName != nil && len(*s.AttributeName) < 1 { 4887 invalidParams.Add(request.NewErrParamMinLen("AttributeName", 1)) 4888 } 4889 if s.ServerName == nil { 4890 invalidParams.Add(request.NewErrParamRequired("ServerName")) 4891 } 4892 if s.ServerName != nil && len(*s.ServerName) < 1 { 4893 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 4894 } 4895 4896 if invalidParams.Len() > 0 { 4897 return invalidParams 4898 } 4899 return nil 4900} 4901 4902// SetAttributeName sets the AttributeName field's value. 4903func (s *UpdateServerEngineAttributesInput) SetAttributeName(v string) *UpdateServerEngineAttributesInput { 4904 s.AttributeName = &v 4905 return s 4906} 4907 4908// SetAttributeValue sets the AttributeValue field's value. 4909func (s *UpdateServerEngineAttributesInput) SetAttributeValue(v string) *UpdateServerEngineAttributesInput { 4910 s.AttributeValue = &v 4911 return s 4912} 4913 4914// SetServerName sets the ServerName field's value. 4915func (s *UpdateServerEngineAttributesInput) SetServerName(v string) *UpdateServerEngineAttributesInput { 4916 s.ServerName = &v 4917 return s 4918} 4919 4920type UpdateServerEngineAttributesOutput struct { 4921 _ struct{} `type:"structure"` 4922 4923 // Contains the response to an UpdateServerEngineAttributes request. 4924 Server *Server `type:"structure"` 4925} 4926 4927// String returns the string representation 4928func (s UpdateServerEngineAttributesOutput) String() string { 4929 return awsutil.Prettify(s) 4930} 4931 4932// GoString returns the string representation 4933func (s UpdateServerEngineAttributesOutput) GoString() string { 4934 return s.String() 4935} 4936 4937// SetServer sets the Server field's value. 4938func (s *UpdateServerEngineAttributesOutput) SetServer(v *Server) *UpdateServerEngineAttributesOutput { 4939 s.Server = v 4940 return s 4941} 4942 4943type UpdateServerInput struct { 4944 _ struct{} `type:"structure"` 4945 4946 // Sets the number of automated backups that you want to keep. 4947 BackupRetentionCount *int64 `type:"integer"` 4948 4949 // Setting DisableAutomatedBackup to true disables automated or scheduled backups. 4950 // Automated backups are enabled by default. 4951 DisableAutomatedBackup *bool `type:"boolean"` 4952 4953 // DDD:HH:MM (weekly start time) or HH:MM (daily start time). 4954 // 4955 // Time windows always use coordinated universal time (UTC). Valid strings for 4956 // day of week (DDD) are: Mon, Tue, Wed, Thr, Fri, Sat, or Sun. 4957 PreferredBackupWindow *string `type:"string"` 4958 4959 // DDD:HH:MM (weekly start time) or HH:MM (daily start time). 4960 // 4961 // Time windows always use coordinated universal time (UTC). Valid strings for 4962 // day of week (DDD) are: Mon, Tue, Wed, Thr, Fri, Sat, or Sun. 4963 PreferredMaintenanceWindow *string `type:"string"` 4964 4965 // The name of the server to update. 4966 // 4967 // ServerName is a required field 4968 ServerName *string `min:"1" type:"string" required:"true"` 4969} 4970 4971// String returns the string representation 4972func (s UpdateServerInput) String() string { 4973 return awsutil.Prettify(s) 4974} 4975 4976// GoString returns the string representation 4977func (s UpdateServerInput) GoString() string { 4978 return s.String() 4979} 4980 4981// Validate inspects the fields of the type to determine if they are valid. 4982func (s *UpdateServerInput) Validate() error { 4983 invalidParams := request.ErrInvalidParams{Context: "UpdateServerInput"} 4984 if s.ServerName == nil { 4985 invalidParams.Add(request.NewErrParamRequired("ServerName")) 4986 } 4987 if s.ServerName != nil && len(*s.ServerName) < 1 { 4988 invalidParams.Add(request.NewErrParamMinLen("ServerName", 1)) 4989 } 4990 4991 if invalidParams.Len() > 0 { 4992 return invalidParams 4993 } 4994 return nil 4995} 4996 4997// SetBackupRetentionCount sets the BackupRetentionCount field's value. 4998func (s *UpdateServerInput) SetBackupRetentionCount(v int64) *UpdateServerInput { 4999 s.BackupRetentionCount = &v 5000 return s 5001} 5002 5003// SetDisableAutomatedBackup sets the DisableAutomatedBackup field's value. 5004func (s *UpdateServerInput) SetDisableAutomatedBackup(v bool) *UpdateServerInput { 5005 s.DisableAutomatedBackup = &v 5006 return s 5007} 5008 5009// SetPreferredBackupWindow sets the PreferredBackupWindow field's value. 5010func (s *UpdateServerInput) SetPreferredBackupWindow(v string) *UpdateServerInput { 5011 s.PreferredBackupWindow = &v 5012 return s 5013} 5014 5015// SetPreferredMaintenanceWindow sets the PreferredMaintenanceWindow field's value. 5016func (s *UpdateServerInput) SetPreferredMaintenanceWindow(v string) *UpdateServerInput { 5017 s.PreferredMaintenanceWindow = &v 5018 return s 5019} 5020 5021// SetServerName sets the ServerName field's value. 5022func (s *UpdateServerInput) SetServerName(v string) *UpdateServerInput { 5023 s.ServerName = &v 5024 return s 5025} 5026 5027type UpdateServerOutput struct { 5028 _ struct{} `type:"structure"` 5029 5030 // Contains the response to a UpdateServer request. 5031 Server *Server `type:"structure"` 5032} 5033 5034// String returns the string representation 5035func (s UpdateServerOutput) String() string { 5036 return awsutil.Prettify(s) 5037} 5038 5039// GoString returns the string representation 5040func (s UpdateServerOutput) GoString() string { 5041 return s.String() 5042} 5043 5044// SetServer sets the Server field's value. 5045func (s *UpdateServerOutput) SetServer(v *Server) *UpdateServerOutput { 5046 s.Server = v 5047 return s 5048} 5049 5050// One or more of the provided request parameters are not valid. 5051type ValidationException struct { 5052 _ struct{} `type:"structure"` 5053 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5054 5055 // Error or informational message that can contain more detail about a validation 5056 // failure. 5057 Message_ *string `locationName:"Message" type:"string"` 5058} 5059 5060// String returns the string representation 5061func (s ValidationException) String() string { 5062 return awsutil.Prettify(s) 5063} 5064 5065// GoString returns the string representation 5066func (s ValidationException) GoString() string { 5067 return s.String() 5068} 5069 5070func newErrorValidationException(v protocol.ResponseMetadata) error { 5071 return &ValidationException{ 5072 RespMetadata: v, 5073 } 5074} 5075 5076// Code returns the exception type name. 5077func (s *ValidationException) Code() string { 5078 return "ValidationException" 5079} 5080 5081// Message returns the exception's message. 5082func (s *ValidationException) Message() string { 5083 if s.Message_ != nil { 5084 return *s.Message_ 5085 } 5086 return "" 5087} 5088 5089// OrigErr always returns nil, satisfies awserr.Error interface. 5090func (s *ValidationException) OrigErr() error { 5091 return nil 5092} 5093 5094func (s *ValidationException) Error() string { 5095 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5096} 5097 5098// Status code returns the HTTP status code for the request's response error. 5099func (s *ValidationException) StatusCode() int { 5100 return s.RespMetadata.StatusCode 5101} 5102 5103// RequestID returns the service's response RequestID for request. 5104func (s *ValidationException) RequestID() string { 5105 return s.RespMetadata.RequestID 5106} 5107 5108const ( 5109 // BackupStatusInProgress is a BackupStatus enum value 5110 BackupStatusInProgress = "IN_PROGRESS" 5111 5112 // BackupStatusOk is a BackupStatus enum value 5113 BackupStatusOk = "OK" 5114 5115 // BackupStatusFailed is a BackupStatus enum value 5116 BackupStatusFailed = "FAILED" 5117 5118 // BackupStatusDeleting is a BackupStatus enum value 5119 BackupStatusDeleting = "DELETING" 5120) 5121 5122const ( 5123 // BackupTypeAutomated is a BackupType enum value 5124 BackupTypeAutomated = "AUTOMATED" 5125 5126 // BackupTypeManual is a BackupType enum value 5127 BackupTypeManual = "MANUAL" 5128) 5129 5130const ( 5131 // MaintenanceStatusSuccess is a MaintenanceStatus enum value 5132 MaintenanceStatusSuccess = "SUCCESS" 5133 5134 // MaintenanceStatusFailed is a MaintenanceStatus enum value 5135 MaintenanceStatusFailed = "FAILED" 5136) 5137 5138// The status of the association or disassociation request. 5139// 5140// Possible values: 5141// 5142// * SUCCESS: The association or disassociation succeeded. 5143// 5144// * FAILED: The association or disassociation failed. 5145// 5146// * IN_PROGRESS: The association or disassociation is still in progress. 5147const ( 5148 // NodeAssociationStatusSuccess is a NodeAssociationStatus enum value 5149 NodeAssociationStatusSuccess = "SUCCESS" 5150 5151 // NodeAssociationStatusFailed is a NodeAssociationStatus enum value 5152 NodeAssociationStatusFailed = "FAILED" 5153 5154 // NodeAssociationStatusInProgress is a NodeAssociationStatus enum value 5155 NodeAssociationStatusInProgress = "IN_PROGRESS" 5156) 5157 5158const ( 5159 // ServerStatusBackingUp is a ServerStatus enum value 5160 ServerStatusBackingUp = "BACKING_UP" 5161 5162 // ServerStatusConnectionLost is a ServerStatus enum value 5163 ServerStatusConnectionLost = "CONNECTION_LOST" 5164 5165 // ServerStatusCreating is a ServerStatus enum value 5166 ServerStatusCreating = "CREATING" 5167 5168 // ServerStatusDeleting is a ServerStatus enum value 5169 ServerStatusDeleting = "DELETING" 5170 5171 // ServerStatusModifying is a ServerStatus enum value 5172 ServerStatusModifying = "MODIFYING" 5173 5174 // ServerStatusFailed is a ServerStatus enum value 5175 ServerStatusFailed = "FAILED" 5176 5177 // ServerStatusHealthy is a ServerStatus enum value 5178 ServerStatusHealthy = "HEALTHY" 5179 5180 // ServerStatusRunning is a ServerStatus enum value 5181 ServerStatusRunning = "RUNNING" 5182 5183 // ServerStatusRestoring is a ServerStatus enum value 5184 ServerStatusRestoring = "RESTORING" 5185 5186 // ServerStatusSetup is a ServerStatus enum value 5187 ServerStatusSetup = "SETUP" 5188 5189 // ServerStatusUnderMaintenance is a ServerStatus enum value 5190 ServerStatusUnderMaintenance = "UNDER_MAINTENANCE" 5191 5192 // ServerStatusUnhealthy is a ServerStatus enum value 5193 ServerStatusUnhealthy = "UNHEALTHY" 5194 5195 // ServerStatusTerminated is a ServerStatus enum value 5196 ServerStatusTerminated = "TERMINATED" 5197) 5198