github.com/aavshr/aws-sdk-go@v1.41.3/service/mediastore/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package mediastore 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/jsonrpc" 14 ) 15 16 const opCreateContainer = "CreateContainer" 17 18 // CreateContainerRequest generates a "aws/request.Request" representing the 19 // client's request for the CreateContainer 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 CreateContainer for more information on using the CreateContainer 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 CreateContainerRequest method. 34 // req, resp := client.CreateContainerRequest(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/mediastore-2017-09-01/CreateContainer 42 func (c *MediaStore) CreateContainerRequest(input *CreateContainerInput) (req *request.Request, output *CreateContainerOutput) { 43 op := &request.Operation{ 44 Name: opCreateContainer, 45 HTTPMethod: "POST", 46 HTTPPath: "/", 47 } 48 49 if input == nil { 50 input = &CreateContainerInput{} 51 } 52 53 output = &CreateContainerOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // CreateContainer API operation for AWS Elemental MediaStore. 59 // 60 // Creates a storage container to hold objects. A container is similar to a 61 // bucket in the Amazon S3 service. 62 // 63 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 64 // with awserr.Error's Code and Message methods to get detailed information about 65 // the error. 66 // 67 // See the AWS API reference guide for AWS Elemental MediaStore's 68 // API operation CreateContainer for usage and error information. 69 // 70 // Returned Error Types: 71 // * ContainerInUseException 72 // The container that you specified in the request already exists or is being 73 // updated. 74 // 75 // * LimitExceededException 76 // A service limit has been exceeded. 77 // 78 // * InternalServerError 79 // The service is temporarily unavailable. 80 // 81 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/CreateContainer 82 func (c *MediaStore) CreateContainer(input *CreateContainerInput) (*CreateContainerOutput, error) { 83 req, out := c.CreateContainerRequest(input) 84 return out, req.Send() 85 } 86 87 // CreateContainerWithContext is the same as CreateContainer with the addition of 88 // the ability to pass a context and additional request options. 89 // 90 // See CreateContainer for details on how to use this API operation. 91 // 92 // The context must be non-nil and will be used for request cancellation. If 93 // the context is nil a panic will occur. In the future the SDK may create 94 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 95 // for more information on using Contexts. 96 func (c *MediaStore) CreateContainerWithContext(ctx aws.Context, input *CreateContainerInput, opts ...request.Option) (*CreateContainerOutput, error) { 97 req, out := c.CreateContainerRequest(input) 98 req.SetContext(ctx) 99 req.ApplyOptions(opts...) 100 return out, req.Send() 101 } 102 103 const opDeleteContainer = "DeleteContainer" 104 105 // DeleteContainerRequest generates a "aws/request.Request" representing the 106 // client's request for the DeleteContainer operation. The "output" return 107 // value will be populated with the request's response once the request completes 108 // successfully. 109 // 110 // Use "Send" method on the returned Request to send the API call to the service. 111 // the "output" return value is not valid until after Send returns without error. 112 // 113 // See DeleteContainer for more information on using the DeleteContainer 114 // API call, and error handling. 115 // 116 // This method is useful when you want to inject custom logic or configuration 117 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 118 // 119 // 120 // // Example sending a request using the DeleteContainerRequest method. 121 // req, resp := client.DeleteContainerRequest(params) 122 // 123 // err := req.Send() 124 // if err == nil { // resp is now filled 125 // fmt.Println(resp) 126 // } 127 // 128 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer 129 func (c *MediaStore) DeleteContainerRequest(input *DeleteContainerInput) (req *request.Request, output *DeleteContainerOutput) { 130 op := &request.Operation{ 131 Name: opDeleteContainer, 132 HTTPMethod: "POST", 133 HTTPPath: "/", 134 } 135 136 if input == nil { 137 input = &DeleteContainerInput{} 138 } 139 140 output = &DeleteContainerOutput{} 141 req = c.newRequest(op, input, output) 142 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 143 return 144 } 145 146 // DeleteContainer API operation for AWS Elemental MediaStore. 147 // 148 // Deletes the specified container. Before you make a DeleteContainer request, 149 // delete any objects in the container or in any folders in the container. You 150 // can delete only empty containers. 151 // 152 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 153 // with awserr.Error's Code and Message methods to get detailed information about 154 // the error. 155 // 156 // See the AWS API reference guide for AWS Elemental MediaStore's 157 // API operation DeleteContainer for usage and error information. 158 // 159 // Returned Error Types: 160 // * ContainerInUseException 161 // The container that you specified in the request already exists or is being 162 // updated. 163 // 164 // * ContainerNotFoundException 165 // The container that you specified in the request does not exist. 166 // 167 // * InternalServerError 168 // The service is temporarily unavailable. 169 // 170 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainer 171 func (c *MediaStore) DeleteContainer(input *DeleteContainerInput) (*DeleteContainerOutput, error) { 172 req, out := c.DeleteContainerRequest(input) 173 return out, req.Send() 174 } 175 176 // DeleteContainerWithContext is the same as DeleteContainer with the addition of 177 // the ability to pass a context and additional request options. 178 // 179 // See DeleteContainer for details on how to use this API operation. 180 // 181 // The context must be non-nil and will be used for request cancellation. If 182 // the context is nil a panic will occur. In the future the SDK may create 183 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 184 // for more information on using Contexts. 185 func (c *MediaStore) DeleteContainerWithContext(ctx aws.Context, input *DeleteContainerInput, opts ...request.Option) (*DeleteContainerOutput, error) { 186 req, out := c.DeleteContainerRequest(input) 187 req.SetContext(ctx) 188 req.ApplyOptions(opts...) 189 return out, req.Send() 190 } 191 192 const opDeleteContainerPolicy = "DeleteContainerPolicy" 193 194 // DeleteContainerPolicyRequest generates a "aws/request.Request" representing the 195 // client's request for the DeleteContainerPolicy operation. The "output" return 196 // value will be populated with the request's response once the request completes 197 // successfully. 198 // 199 // Use "Send" method on the returned Request to send the API call to the service. 200 // the "output" return value is not valid until after Send returns without error. 201 // 202 // See DeleteContainerPolicy for more information on using the DeleteContainerPolicy 203 // API call, and error handling. 204 // 205 // This method is useful when you want to inject custom logic or configuration 206 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 207 // 208 // 209 // // Example sending a request using the DeleteContainerPolicyRequest method. 210 // req, resp := client.DeleteContainerPolicyRequest(params) 211 // 212 // err := req.Send() 213 // if err == nil { // resp is now filled 214 // fmt.Println(resp) 215 // } 216 // 217 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy 218 func (c *MediaStore) DeleteContainerPolicyRequest(input *DeleteContainerPolicyInput) (req *request.Request, output *DeleteContainerPolicyOutput) { 219 op := &request.Operation{ 220 Name: opDeleteContainerPolicy, 221 HTTPMethod: "POST", 222 HTTPPath: "/", 223 } 224 225 if input == nil { 226 input = &DeleteContainerPolicyInput{} 227 } 228 229 output = &DeleteContainerPolicyOutput{} 230 req = c.newRequest(op, input, output) 231 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 232 return 233 } 234 235 // DeleteContainerPolicy API operation for AWS Elemental MediaStore. 236 // 237 // Deletes the access policy that is associated with the specified container. 238 // 239 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 240 // with awserr.Error's Code and Message methods to get detailed information about 241 // the error. 242 // 243 // See the AWS API reference guide for AWS Elemental MediaStore's 244 // API operation DeleteContainerPolicy for usage and error information. 245 // 246 // Returned Error Types: 247 // * ContainerInUseException 248 // The container that you specified in the request already exists or is being 249 // updated. 250 // 251 // * ContainerNotFoundException 252 // The container that you specified in the request does not exist. 253 // 254 // * PolicyNotFoundException 255 // The policy that you specified in the request does not exist. 256 // 257 // * InternalServerError 258 // The service is temporarily unavailable. 259 // 260 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteContainerPolicy 261 func (c *MediaStore) DeleteContainerPolicy(input *DeleteContainerPolicyInput) (*DeleteContainerPolicyOutput, error) { 262 req, out := c.DeleteContainerPolicyRequest(input) 263 return out, req.Send() 264 } 265 266 // DeleteContainerPolicyWithContext is the same as DeleteContainerPolicy with the addition of 267 // the ability to pass a context and additional request options. 268 // 269 // See DeleteContainerPolicy for details on how to use this API operation. 270 // 271 // The context must be non-nil and will be used for request cancellation. If 272 // the context is nil a panic will occur. In the future the SDK may create 273 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 274 // for more information on using Contexts. 275 func (c *MediaStore) DeleteContainerPolicyWithContext(ctx aws.Context, input *DeleteContainerPolicyInput, opts ...request.Option) (*DeleteContainerPolicyOutput, error) { 276 req, out := c.DeleteContainerPolicyRequest(input) 277 req.SetContext(ctx) 278 req.ApplyOptions(opts...) 279 return out, req.Send() 280 } 281 282 const opDeleteCorsPolicy = "DeleteCorsPolicy" 283 284 // DeleteCorsPolicyRequest generates a "aws/request.Request" representing the 285 // client's request for the DeleteCorsPolicy operation. The "output" return 286 // value will be populated with the request's response once the request completes 287 // successfully. 288 // 289 // Use "Send" method on the returned Request to send the API call to the service. 290 // the "output" return value is not valid until after Send returns without error. 291 // 292 // See DeleteCorsPolicy for more information on using the DeleteCorsPolicy 293 // API call, and error handling. 294 // 295 // This method is useful when you want to inject custom logic or configuration 296 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 297 // 298 // 299 // // Example sending a request using the DeleteCorsPolicyRequest method. 300 // req, resp := client.DeleteCorsPolicyRequest(params) 301 // 302 // err := req.Send() 303 // if err == nil { // resp is now filled 304 // fmt.Println(resp) 305 // } 306 // 307 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy 308 func (c *MediaStore) DeleteCorsPolicyRequest(input *DeleteCorsPolicyInput) (req *request.Request, output *DeleteCorsPolicyOutput) { 309 op := &request.Operation{ 310 Name: opDeleteCorsPolicy, 311 HTTPMethod: "POST", 312 HTTPPath: "/", 313 } 314 315 if input == nil { 316 input = &DeleteCorsPolicyInput{} 317 } 318 319 output = &DeleteCorsPolicyOutput{} 320 req = c.newRequest(op, input, output) 321 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 322 return 323 } 324 325 // DeleteCorsPolicy API operation for AWS Elemental MediaStore. 326 // 327 // Deletes the cross-origin resource sharing (CORS) configuration information 328 // that is set for the container. 329 // 330 // To use this operation, you must have permission to perform the MediaStore:DeleteCorsPolicy 331 // action. The container owner has this permission by default and can grant 332 // this permission to others. 333 // 334 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 335 // with awserr.Error's Code and Message methods to get detailed information about 336 // the error. 337 // 338 // See the AWS API reference guide for AWS Elemental MediaStore's 339 // API operation DeleteCorsPolicy for usage and error information. 340 // 341 // Returned Error Types: 342 // * ContainerInUseException 343 // The container that you specified in the request already exists or is being 344 // updated. 345 // 346 // * ContainerNotFoundException 347 // The container that you specified in the request does not exist. 348 // 349 // * CorsPolicyNotFoundException 350 // The CORS policy that you specified in the request does not exist. 351 // 352 // * InternalServerError 353 // The service is temporarily unavailable. 354 // 355 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteCorsPolicy 356 func (c *MediaStore) DeleteCorsPolicy(input *DeleteCorsPolicyInput) (*DeleteCorsPolicyOutput, error) { 357 req, out := c.DeleteCorsPolicyRequest(input) 358 return out, req.Send() 359 } 360 361 // DeleteCorsPolicyWithContext is the same as DeleteCorsPolicy with the addition of 362 // the ability to pass a context and additional request options. 363 // 364 // See DeleteCorsPolicy for details on how to use this API operation. 365 // 366 // The context must be non-nil and will be used for request cancellation. If 367 // the context is nil a panic will occur. In the future the SDK may create 368 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 369 // for more information on using Contexts. 370 func (c *MediaStore) DeleteCorsPolicyWithContext(ctx aws.Context, input *DeleteCorsPolicyInput, opts ...request.Option) (*DeleteCorsPolicyOutput, error) { 371 req, out := c.DeleteCorsPolicyRequest(input) 372 req.SetContext(ctx) 373 req.ApplyOptions(opts...) 374 return out, req.Send() 375 } 376 377 const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy" 378 379 // DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the 380 // client's request for the DeleteLifecyclePolicy operation. The "output" return 381 // value will be populated with the request's response once the request completes 382 // successfully. 383 // 384 // Use "Send" method on the returned Request to send the API call to the service. 385 // the "output" return value is not valid until after Send returns without error. 386 // 387 // See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy 388 // API call, and error handling. 389 // 390 // This method is useful when you want to inject custom logic or configuration 391 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 392 // 393 // 394 // // Example sending a request using the DeleteLifecyclePolicyRequest method. 395 // req, resp := client.DeleteLifecyclePolicyRequest(params) 396 // 397 // err := req.Send() 398 // if err == nil { // resp is now filled 399 // fmt.Println(resp) 400 // } 401 // 402 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy 403 func (c *MediaStore) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) { 404 op := &request.Operation{ 405 Name: opDeleteLifecyclePolicy, 406 HTTPMethod: "POST", 407 HTTPPath: "/", 408 } 409 410 if input == nil { 411 input = &DeleteLifecyclePolicyInput{} 412 } 413 414 output = &DeleteLifecyclePolicyOutput{} 415 req = c.newRequest(op, input, output) 416 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 417 return 418 } 419 420 // DeleteLifecyclePolicy API operation for AWS Elemental MediaStore. 421 // 422 // Removes an object lifecycle policy from a container. It takes up to 20 minutes 423 // for the change to take effect. 424 // 425 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 426 // with awserr.Error's Code and Message methods to get detailed information about 427 // the error. 428 // 429 // See the AWS API reference guide for AWS Elemental MediaStore's 430 // API operation DeleteLifecyclePolicy for usage and error information. 431 // 432 // Returned Error Types: 433 // * ContainerInUseException 434 // The container that you specified in the request already exists or is being 435 // updated. 436 // 437 // * ContainerNotFoundException 438 // The container that you specified in the request does not exist. 439 // 440 // * PolicyNotFoundException 441 // The policy that you specified in the request does not exist. 442 // 443 // * InternalServerError 444 // The service is temporarily unavailable. 445 // 446 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteLifecyclePolicy 447 func (c *MediaStore) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) { 448 req, out := c.DeleteLifecyclePolicyRequest(input) 449 return out, req.Send() 450 } 451 452 // DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of 453 // the ability to pass a context and additional request options. 454 // 455 // See DeleteLifecyclePolicy for details on how to use this API operation. 456 // 457 // The context must be non-nil and will be used for request cancellation. If 458 // the context is nil a panic will occur. In the future the SDK may create 459 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 460 // for more information on using Contexts. 461 func (c *MediaStore) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) { 462 req, out := c.DeleteLifecyclePolicyRequest(input) 463 req.SetContext(ctx) 464 req.ApplyOptions(opts...) 465 return out, req.Send() 466 } 467 468 const opDeleteMetricPolicy = "DeleteMetricPolicy" 469 470 // DeleteMetricPolicyRequest generates a "aws/request.Request" representing the 471 // client's request for the DeleteMetricPolicy operation. The "output" return 472 // value will be populated with the request's response once the request completes 473 // successfully. 474 // 475 // Use "Send" method on the returned Request to send the API call to the service. 476 // the "output" return value is not valid until after Send returns without error. 477 // 478 // See DeleteMetricPolicy for more information on using the DeleteMetricPolicy 479 // API call, and error handling. 480 // 481 // This method is useful when you want to inject custom logic or configuration 482 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 483 // 484 // 485 // // Example sending a request using the DeleteMetricPolicyRequest method. 486 // req, resp := client.DeleteMetricPolicyRequest(params) 487 // 488 // err := req.Send() 489 // if err == nil { // resp is now filled 490 // fmt.Println(resp) 491 // } 492 // 493 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteMetricPolicy 494 func (c *MediaStore) DeleteMetricPolicyRequest(input *DeleteMetricPolicyInput) (req *request.Request, output *DeleteMetricPolicyOutput) { 495 op := &request.Operation{ 496 Name: opDeleteMetricPolicy, 497 HTTPMethod: "POST", 498 HTTPPath: "/", 499 } 500 501 if input == nil { 502 input = &DeleteMetricPolicyInput{} 503 } 504 505 output = &DeleteMetricPolicyOutput{} 506 req = c.newRequest(op, input, output) 507 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 508 return 509 } 510 511 // DeleteMetricPolicy API operation for AWS Elemental MediaStore. 512 // 513 // Deletes the metric policy that is associated with the specified container. 514 // If there is no metric policy associated with the container, MediaStore doesn't 515 // send metrics to CloudWatch. 516 // 517 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 518 // with awserr.Error's Code and Message methods to get detailed information about 519 // the error. 520 // 521 // See the AWS API reference guide for AWS Elemental MediaStore's 522 // API operation DeleteMetricPolicy for usage and error information. 523 // 524 // Returned Error Types: 525 // * ContainerInUseException 526 // The container that you specified in the request already exists or is being 527 // updated. 528 // 529 // * ContainerNotFoundException 530 // The container that you specified in the request does not exist. 531 // 532 // * PolicyNotFoundException 533 // The policy that you specified in the request does not exist. 534 // 535 // * InternalServerError 536 // The service is temporarily unavailable. 537 // 538 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DeleteMetricPolicy 539 func (c *MediaStore) DeleteMetricPolicy(input *DeleteMetricPolicyInput) (*DeleteMetricPolicyOutput, error) { 540 req, out := c.DeleteMetricPolicyRequest(input) 541 return out, req.Send() 542 } 543 544 // DeleteMetricPolicyWithContext is the same as DeleteMetricPolicy with the addition of 545 // the ability to pass a context and additional request options. 546 // 547 // See DeleteMetricPolicy for details on how to use this API operation. 548 // 549 // The context must be non-nil and will be used for request cancellation. If 550 // the context is nil a panic will occur. In the future the SDK may create 551 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 552 // for more information on using Contexts. 553 func (c *MediaStore) DeleteMetricPolicyWithContext(ctx aws.Context, input *DeleteMetricPolicyInput, opts ...request.Option) (*DeleteMetricPolicyOutput, error) { 554 req, out := c.DeleteMetricPolicyRequest(input) 555 req.SetContext(ctx) 556 req.ApplyOptions(opts...) 557 return out, req.Send() 558 } 559 560 const opDescribeContainer = "DescribeContainer" 561 562 // DescribeContainerRequest generates a "aws/request.Request" representing the 563 // client's request for the DescribeContainer operation. The "output" return 564 // value will be populated with the request's response once the request completes 565 // successfully. 566 // 567 // Use "Send" method on the returned Request to send the API call to the service. 568 // the "output" return value is not valid until after Send returns without error. 569 // 570 // See DescribeContainer for more information on using the DescribeContainer 571 // API call, and error handling. 572 // 573 // This method is useful when you want to inject custom logic or configuration 574 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 575 // 576 // 577 // // Example sending a request using the DescribeContainerRequest method. 578 // req, resp := client.DescribeContainerRequest(params) 579 // 580 // err := req.Send() 581 // if err == nil { // resp is now filled 582 // fmt.Println(resp) 583 // } 584 // 585 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer 586 func (c *MediaStore) DescribeContainerRequest(input *DescribeContainerInput) (req *request.Request, output *DescribeContainerOutput) { 587 op := &request.Operation{ 588 Name: opDescribeContainer, 589 HTTPMethod: "POST", 590 HTTPPath: "/", 591 } 592 593 if input == nil { 594 input = &DescribeContainerInput{} 595 } 596 597 output = &DescribeContainerOutput{} 598 req = c.newRequest(op, input, output) 599 return 600 } 601 602 // DescribeContainer API operation for AWS Elemental MediaStore. 603 // 604 // Retrieves the properties of the requested container. This request is commonly 605 // used to retrieve the endpoint of a container. An endpoint is a value assigned 606 // by the service when a new container is created. A container's endpoint does 607 // not change after it has been assigned. The DescribeContainer request returns 608 // a single Container object based on ContainerName. To return all Container 609 // objects that are associated with a specified AWS account, use ListContainers. 610 // 611 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 612 // with awserr.Error's Code and Message methods to get detailed information about 613 // the error. 614 // 615 // See the AWS API reference guide for AWS Elemental MediaStore's 616 // API operation DescribeContainer for usage and error information. 617 // 618 // Returned Error Types: 619 // * ContainerNotFoundException 620 // The container that you specified in the request does not exist. 621 // 622 // * InternalServerError 623 // The service is temporarily unavailable. 624 // 625 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/DescribeContainer 626 func (c *MediaStore) DescribeContainer(input *DescribeContainerInput) (*DescribeContainerOutput, error) { 627 req, out := c.DescribeContainerRequest(input) 628 return out, req.Send() 629 } 630 631 // DescribeContainerWithContext is the same as DescribeContainer with the addition of 632 // the ability to pass a context and additional request options. 633 // 634 // See DescribeContainer for details on how to use this API operation. 635 // 636 // The context must be non-nil and will be used for request cancellation. If 637 // the context is nil a panic will occur. In the future the SDK may create 638 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 639 // for more information on using Contexts. 640 func (c *MediaStore) DescribeContainerWithContext(ctx aws.Context, input *DescribeContainerInput, opts ...request.Option) (*DescribeContainerOutput, error) { 641 req, out := c.DescribeContainerRequest(input) 642 req.SetContext(ctx) 643 req.ApplyOptions(opts...) 644 return out, req.Send() 645 } 646 647 const opGetContainerPolicy = "GetContainerPolicy" 648 649 // GetContainerPolicyRequest generates a "aws/request.Request" representing the 650 // client's request for the GetContainerPolicy operation. The "output" return 651 // value will be populated with the request's response once the request completes 652 // successfully. 653 // 654 // Use "Send" method on the returned Request to send the API call to the service. 655 // the "output" return value is not valid until after Send returns without error. 656 // 657 // See GetContainerPolicy for more information on using the GetContainerPolicy 658 // API call, and error handling. 659 // 660 // This method is useful when you want to inject custom logic or configuration 661 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 662 // 663 // 664 // // Example sending a request using the GetContainerPolicyRequest method. 665 // req, resp := client.GetContainerPolicyRequest(params) 666 // 667 // err := req.Send() 668 // if err == nil { // resp is now filled 669 // fmt.Println(resp) 670 // } 671 // 672 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy 673 func (c *MediaStore) GetContainerPolicyRequest(input *GetContainerPolicyInput) (req *request.Request, output *GetContainerPolicyOutput) { 674 op := &request.Operation{ 675 Name: opGetContainerPolicy, 676 HTTPMethod: "POST", 677 HTTPPath: "/", 678 } 679 680 if input == nil { 681 input = &GetContainerPolicyInput{} 682 } 683 684 output = &GetContainerPolicyOutput{} 685 req = c.newRequest(op, input, output) 686 return 687 } 688 689 // GetContainerPolicy API operation for AWS Elemental MediaStore. 690 // 691 // Retrieves the access policy for the specified container. For information 692 // about the data that is included in an access policy, see the AWS Identity 693 // and Access Management User Guide (https://aws.amazon.com/documentation/iam/). 694 // 695 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 696 // with awserr.Error's Code and Message methods to get detailed information about 697 // the error. 698 // 699 // See the AWS API reference guide for AWS Elemental MediaStore's 700 // API operation GetContainerPolicy for usage and error information. 701 // 702 // Returned Error Types: 703 // * ContainerInUseException 704 // The container that you specified in the request already exists or is being 705 // updated. 706 // 707 // * ContainerNotFoundException 708 // The container that you specified in the request does not exist. 709 // 710 // * PolicyNotFoundException 711 // The policy that you specified in the request does not exist. 712 // 713 // * InternalServerError 714 // The service is temporarily unavailable. 715 // 716 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetContainerPolicy 717 func (c *MediaStore) GetContainerPolicy(input *GetContainerPolicyInput) (*GetContainerPolicyOutput, error) { 718 req, out := c.GetContainerPolicyRequest(input) 719 return out, req.Send() 720 } 721 722 // GetContainerPolicyWithContext is the same as GetContainerPolicy with the addition of 723 // the ability to pass a context and additional request options. 724 // 725 // See GetContainerPolicy for details on how to use this API operation. 726 // 727 // The context must be non-nil and will be used for request cancellation. If 728 // the context is nil a panic will occur. In the future the SDK may create 729 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 730 // for more information on using Contexts. 731 func (c *MediaStore) GetContainerPolicyWithContext(ctx aws.Context, input *GetContainerPolicyInput, opts ...request.Option) (*GetContainerPolicyOutput, error) { 732 req, out := c.GetContainerPolicyRequest(input) 733 req.SetContext(ctx) 734 req.ApplyOptions(opts...) 735 return out, req.Send() 736 } 737 738 const opGetCorsPolicy = "GetCorsPolicy" 739 740 // GetCorsPolicyRequest generates a "aws/request.Request" representing the 741 // client's request for the GetCorsPolicy operation. The "output" return 742 // value will be populated with the request's response once the request completes 743 // successfully. 744 // 745 // Use "Send" method on the returned Request to send the API call to the service. 746 // the "output" return value is not valid until after Send returns without error. 747 // 748 // See GetCorsPolicy for more information on using the GetCorsPolicy 749 // API call, and error handling. 750 // 751 // This method is useful when you want to inject custom logic or configuration 752 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 753 // 754 // 755 // // Example sending a request using the GetCorsPolicyRequest method. 756 // req, resp := client.GetCorsPolicyRequest(params) 757 // 758 // err := req.Send() 759 // if err == nil { // resp is now filled 760 // fmt.Println(resp) 761 // } 762 // 763 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy 764 func (c *MediaStore) GetCorsPolicyRequest(input *GetCorsPolicyInput) (req *request.Request, output *GetCorsPolicyOutput) { 765 op := &request.Operation{ 766 Name: opGetCorsPolicy, 767 HTTPMethod: "POST", 768 HTTPPath: "/", 769 } 770 771 if input == nil { 772 input = &GetCorsPolicyInput{} 773 } 774 775 output = &GetCorsPolicyOutput{} 776 req = c.newRequest(op, input, output) 777 return 778 } 779 780 // GetCorsPolicy API operation for AWS Elemental MediaStore. 781 // 782 // Returns the cross-origin resource sharing (CORS) configuration information 783 // that is set for the container. 784 // 785 // To use this operation, you must have permission to perform the MediaStore:GetCorsPolicy 786 // action. By default, the container owner has this permission and can grant 787 // it to others. 788 // 789 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 790 // with awserr.Error's Code and Message methods to get detailed information about 791 // the error. 792 // 793 // See the AWS API reference guide for AWS Elemental MediaStore's 794 // API operation GetCorsPolicy for usage and error information. 795 // 796 // Returned Error Types: 797 // * ContainerInUseException 798 // The container that you specified in the request already exists or is being 799 // updated. 800 // 801 // * ContainerNotFoundException 802 // The container that you specified in the request does not exist. 803 // 804 // * CorsPolicyNotFoundException 805 // The CORS policy that you specified in the request does not exist. 806 // 807 // * InternalServerError 808 // The service is temporarily unavailable. 809 // 810 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetCorsPolicy 811 func (c *MediaStore) GetCorsPolicy(input *GetCorsPolicyInput) (*GetCorsPolicyOutput, error) { 812 req, out := c.GetCorsPolicyRequest(input) 813 return out, req.Send() 814 } 815 816 // GetCorsPolicyWithContext is the same as GetCorsPolicy with the addition of 817 // the ability to pass a context and additional request options. 818 // 819 // See GetCorsPolicy for details on how to use this API operation. 820 // 821 // The context must be non-nil and will be used for request cancellation. If 822 // the context is nil a panic will occur. In the future the SDK may create 823 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 824 // for more information on using Contexts. 825 func (c *MediaStore) GetCorsPolicyWithContext(ctx aws.Context, input *GetCorsPolicyInput, opts ...request.Option) (*GetCorsPolicyOutput, error) { 826 req, out := c.GetCorsPolicyRequest(input) 827 req.SetContext(ctx) 828 req.ApplyOptions(opts...) 829 return out, req.Send() 830 } 831 832 const opGetLifecyclePolicy = "GetLifecyclePolicy" 833 834 // GetLifecyclePolicyRequest generates a "aws/request.Request" representing the 835 // client's request for the GetLifecyclePolicy operation. The "output" return 836 // value will be populated with the request's response once the request completes 837 // successfully. 838 // 839 // Use "Send" method on the returned Request to send the API call to the service. 840 // the "output" return value is not valid until after Send returns without error. 841 // 842 // See GetLifecyclePolicy for more information on using the GetLifecyclePolicy 843 // API call, and error handling. 844 // 845 // This method is useful when you want to inject custom logic or configuration 846 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 847 // 848 // 849 // // Example sending a request using the GetLifecyclePolicyRequest method. 850 // req, resp := client.GetLifecyclePolicyRequest(params) 851 // 852 // err := req.Send() 853 // if err == nil { // resp is now filled 854 // fmt.Println(resp) 855 // } 856 // 857 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy 858 func (c *MediaStore) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) { 859 op := &request.Operation{ 860 Name: opGetLifecyclePolicy, 861 HTTPMethod: "POST", 862 HTTPPath: "/", 863 } 864 865 if input == nil { 866 input = &GetLifecyclePolicyInput{} 867 } 868 869 output = &GetLifecyclePolicyOutput{} 870 req = c.newRequest(op, input, output) 871 return 872 } 873 874 // GetLifecyclePolicy API operation for AWS Elemental MediaStore. 875 // 876 // Retrieves the object lifecycle policy that is assigned to a container. 877 // 878 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 879 // with awserr.Error's Code and Message methods to get detailed information about 880 // the error. 881 // 882 // See the AWS API reference guide for AWS Elemental MediaStore's 883 // API operation GetLifecyclePolicy for usage and error information. 884 // 885 // Returned Error Types: 886 // * ContainerInUseException 887 // The container that you specified in the request already exists or is being 888 // updated. 889 // 890 // * ContainerNotFoundException 891 // The container that you specified in the request does not exist. 892 // 893 // * PolicyNotFoundException 894 // The policy that you specified in the request does not exist. 895 // 896 // * InternalServerError 897 // The service is temporarily unavailable. 898 // 899 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetLifecyclePolicy 900 func (c *MediaStore) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) { 901 req, out := c.GetLifecyclePolicyRequest(input) 902 return out, req.Send() 903 } 904 905 // GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of 906 // the ability to pass a context and additional request options. 907 // 908 // See GetLifecyclePolicy for details on how to use this API operation. 909 // 910 // The context must be non-nil and will be used for request cancellation. If 911 // the context is nil a panic will occur. In the future the SDK may create 912 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 913 // for more information on using Contexts. 914 func (c *MediaStore) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) { 915 req, out := c.GetLifecyclePolicyRequest(input) 916 req.SetContext(ctx) 917 req.ApplyOptions(opts...) 918 return out, req.Send() 919 } 920 921 const opGetMetricPolicy = "GetMetricPolicy" 922 923 // GetMetricPolicyRequest generates a "aws/request.Request" representing the 924 // client's request for the GetMetricPolicy operation. The "output" return 925 // value will be populated with the request's response once the request completes 926 // successfully. 927 // 928 // Use "Send" method on the returned Request to send the API call to the service. 929 // the "output" return value is not valid until after Send returns without error. 930 // 931 // See GetMetricPolicy for more information on using the GetMetricPolicy 932 // API call, and error handling. 933 // 934 // This method is useful when you want to inject custom logic or configuration 935 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 936 // 937 // 938 // // Example sending a request using the GetMetricPolicyRequest method. 939 // req, resp := client.GetMetricPolicyRequest(params) 940 // 941 // err := req.Send() 942 // if err == nil { // resp is now filled 943 // fmt.Println(resp) 944 // } 945 // 946 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetMetricPolicy 947 func (c *MediaStore) GetMetricPolicyRequest(input *GetMetricPolicyInput) (req *request.Request, output *GetMetricPolicyOutput) { 948 op := &request.Operation{ 949 Name: opGetMetricPolicy, 950 HTTPMethod: "POST", 951 HTTPPath: "/", 952 } 953 954 if input == nil { 955 input = &GetMetricPolicyInput{} 956 } 957 958 output = &GetMetricPolicyOutput{} 959 req = c.newRequest(op, input, output) 960 return 961 } 962 963 // GetMetricPolicy API operation for AWS Elemental MediaStore. 964 // 965 // Returns the metric policy for the specified container. 966 // 967 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 968 // with awserr.Error's Code and Message methods to get detailed information about 969 // the error. 970 // 971 // See the AWS API reference guide for AWS Elemental MediaStore's 972 // API operation GetMetricPolicy for usage and error information. 973 // 974 // Returned Error Types: 975 // * ContainerNotFoundException 976 // The container that you specified in the request does not exist. 977 // 978 // * PolicyNotFoundException 979 // The policy that you specified in the request does not exist. 980 // 981 // * ContainerInUseException 982 // The container that you specified in the request already exists or is being 983 // updated. 984 // 985 // * InternalServerError 986 // The service is temporarily unavailable. 987 // 988 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/GetMetricPolicy 989 func (c *MediaStore) GetMetricPolicy(input *GetMetricPolicyInput) (*GetMetricPolicyOutput, error) { 990 req, out := c.GetMetricPolicyRequest(input) 991 return out, req.Send() 992 } 993 994 // GetMetricPolicyWithContext is the same as GetMetricPolicy with the addition of 995 // the ability to pass a context and additional request options. 996 // 997 // See GetMetricPolicy for details on how to use this API operation. 998 // 999 // The context must be non-nil and will be used for request cancellation. If 1000 // the context is nil a panic will occur. In the future the SDK may create 1001 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1002 // for more information on using Contexts. 1003 func (c *MediaStore) GetMetricPolicyWithContext(ctx aws.Context, input *GetMetricPolicyInput, opts ...request.Option) (*GetMetricPolicyOutput, error) { 1004 req, out := c.GetMetricPolicyRequest(input) 1005 req.SetContext(ctx) 1006 req.ApplyOptions(opts...) 1007 return out, req.Send() 1008 } 1009 1010 const opListContainers = "ListContainers" 1011 1012 // ListContainersRequest generates a "aws/request.Request" representing the 1013 // client's request for the ListContainers operation. The "output" return 1014 // value will be populated with the request's response once the request completes 1015 // successfully. 1016 // 1017 // Use "Send" method on the returned Request to send the API call to the service. 1018 // the "output" return value is not valid until after Send returns without error. 1019 // 1020 // See ListContainers for more information on using the ListContainers 1021 // API call, and error handling. 1022 // 1023 // This method is useful when you want to inject custom logic or configuration 1024 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1025 // 1026 // 1027 // // Example sending a request using the ListContainersRequest method. 1028 // req, resp := client.ListContainersRequest(params) 1029 // 1030 // err := req.Send() 1031 // if err == nil { // resp is now filled 1032 // fmt.Println(resp) 1033 // } 1034 // 1035 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers 1036 func (c *MediaStore) ListContainersRequest(input *ListContainersInput) (req *request.Request, output *ListContainersOutput) { 1037 op := &request.Operation{ 1038 Name: opListContainers, 1039 HTTPMethod: "POST", 1040 HTTPPath: "/", 1041 Paginator: &request.Paginator{ 1042 InputTokens: []string{"NextToken"}, 1043 OutputTokens: []string{"NextToken"}, 1044 LimitToken: "MaxResults", 1045 TruncationToken: "", 1046 }, 1047 } 1048 1049 if input == nil { 1050 input = &ListContainersInput{} 1051 } 1052 1053 output = &ListContainersOutput{} 1054 req = c.newRequest(op, input, output) 1055 return 1056 } 1057 1058 // ListContainers API operation for AWS Elemental MediaStore. 1059 // 1060 // Lists the properties of all containers in AWS Elemental MediaStore. 1061 // 1062 // You can query to receive all the containers in one response. Or you can include 1063 // the MaxResults parameter to receive a limited number of containers in each 1064 // response. In this case, the response includes a token. To get the next set 1065 // of containers, send the command again, this time with the NextToken parameter 1066 // (with the returned token as its value). The next set of responses appears, 1067 // with a token if there are still more containers to receive. 1068 // 1069 // See also DescribeContainer, which gets the properties of one container. 1070 // 1071 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1072 // with awserr.Error's Code and Message methods to get detailed information about 1073 // the error. 1074 // 1075 // See the AWS API reference guide for AWS Elemental MediaStore's 1076 // API operation ListContainers for usage and error information. 1077 // 1078 // Returned Error Types: 1079 // * InternalServerError 1080 // The service is temporarily unavailable. 1081 // 1082 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListContainers 1083 func (c *MediaStore) ListContainers(input *ListContainersInput) (*ListContainersOutput, error) { 1084 req, out := c.ListContainersRequest(input) 1085 return out, req.Send() 1086 } 1087 1088 // ListContainersWithContext is the same as ListContainers with the addition of 1089 // the ability to pass a context and additional request options. 1090 // 1091 // See ListContainers for details on how to use this API operation. 1092 // 1093 // The context must be non-nil and will be used for request cancellation. If 1094 // the context is nil a panic will occur. In the future the SDK may create 1095 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1096 // for more information on using Contexts. 1097 func (c *MediaStore) ListContainersWithContext(ctx aws.Context, input *ListContainersInput, opts ...request.Option) (*ListContainersOutput, error) { 1098 req, out := c.ListContainersRequest(input) 1099 req.SetContext(ctx) 1100 req.ApplyOptions(opts...) 1101 return out, req.Send() 1102 } 1103 1104 // ListContainersPages iterates over the pages of a ListContainers operation, 1105 // calling the "fn" function with the response data for each page. To stop 1106 // iterating, return false from the fn function. 1107 // 1108 // See ListContainers method for more information on how to use this operation. 1109 // 1110 // Note: This operation can generate multiple requests to a service. 1111 // 1112 // // Example iterating over at most 3 pages of a ListContainers operation. 1113 // pageNum := 0 1114 // err := client.ListContainersPages(params, 1115 // func(page *mediastore.ListContainersOutput, lastPage bool) bool { 1116 // pageNum++ 1117 // fmt.Println(page) 1118 // return pageNum <= 3 1119 // }) 1120 // 1121 func (c *MediaStore) ListContainersPages(input *ListContainersInput, fn func(*ListContainersOutput, bool) bool) error { 1122 return c.ListContainersPagesWithContext(aws.BackgroundContext(), input, fn) 1123 } 1124 1125 // ListContainersPagesWithContext same as ListContainersPages except 1126 // it takes a Context and allows setting request options on the pages. 1127 // 1128 // The context must be non-nil and will be used for request cancellation. If 1129 // the context is nil a panic will occur. In the future the SDK may create 1130 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1131 // for more information on using Contexts. 1132 func (c *MediaStore) ListContainersPagesWithContext(ctx aws.Context, input *ListContainersInput, fn func(*ListContainersOutput, bool) bool, opts ...request.Option) error { 1133 p := request.Pagination{ 1134 NewRequest: func() (*request.Request, error) { 1135 var inCpy *ListContainersInput 1136 if input != nil { 1137 tmp := *input 1138 inCpy = &tmp 1139 } 1140 req, _ := c.ListContainersRequest(inCpy) 1141 req.SetContext(ctx) 1142 req.ApplyOptions(opts...) 1143 return req, nil 1144 }, 1145 } 1146 1147 for p.Next() { 1148 if !fn(p.Page().(*ListContainersOutput), !p.HasNextPage()) { 1149 break 1150 } 1151 } 1152 1153 return p.Err() 1154 } 1155 1156 const opListTagsForResource = "ListTagsForResource" 1157 1158 // ListTagsForResourceRequest generates a "aws/request.Request" representing the 1159 // client's request for the ListTagsForResource operation. The "output" return 1160 // value will be populated with the request's response once the request completes 1161 // successfully. 1162 // 1163 // Use "Send" method on the returned Request to send the API call to the service. 1164 // the "output" return value is not valid until after Send returns without error. 1165 // 1166 // See ListTagsForResource for more information on using the ListTagsForResource 1167 // API call, and error handling. 1168 // 1169 // This method is useful when you want to inject custom logic or configuration 1170 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1171 // 1172 // 1173 // // Example sending a request using the ListTagsForResourceRequest method. 1174 // req, resp := client.ListTagsForResourceRequest(params) 1175 // 1176 // err := req.Send() 1177 // if err == nil { // resp is now filled 1178 // fmt.Println(resp) 1179 // } 1180 // 1181 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListTagsForResource 1182 func (c *MediaStore) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1183 op := &request.Operation{ 1184 Name: opListTagsForResource, 1185 HTTPMethod: "POST", 1186 HTTPPath: "/", 1187 } 1188 1189 if input == nil { 1190 input = &ListTagsForResourceInput{} 1191 } 1192 1193 output = &ListTagsForResourceOutput{} 1194 req = c.newRequest(op, input, output) 1195 return 1196 } 1197 1198 // ListTagsForResource API operation for AWS Elemental MediaStore. 1199 // 1200 // Returns a list of the tags assigned to the specified container. 1201 // 1202 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1203 // with awserr.Error's Code and Message methods to get detailed information about 1204 // the error. 1205 // 1206 // See the AWS API reference guide for AWS Elemental MediaStore's 1207 // API operation ListTagsForResource for usage and error information. 1208 // 1209 // Returned Error Types: 1210 // * ContainerInUseException 1211 // The container that you specified in the request already exists or is being 1212 // updated. 1213 // 1214 // * ContainerNotFoundException 1215 // The container that you specified in the request does not exist. 1216 // 1217 // * InternalServerError 1218 // The service is temporarily unavailable. 1219 // 1220 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/ListTagsForResource 1221 func (c *MediaStore) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1222 req, out := c.ListTagsForResourceRequest(input) 1223 return out, req.Send() 1224 } 1225 1226 // ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1227 // the ability to pass a context and additional request options. 1228 // 1229 // See ListTagsForResource for details on how to use this API operation. 1230 // 1231 // The context must be non-nil and will be used for request cancellation. If 1232 // the context is nil a panic will occur. In the future the SDK may create 1233 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1234 // for more information on using Contexts. 1235 func (c *MediaStore) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1236 req, out := c.ListTagsForResourceRequest(input) 1237 req.SetContext(ctx) 1238 req.ApplyOptions(opts...) 1239 return out, req.Send() 1240 } 1241 1242 const opPutContainerPolicy = "PutContainerPolicy" 1243 1244 // PutContainerPolicyRequest generates a "aws/request.Request" representing the 1245 // client's request for the PutContainerPolicy operation. The "output" return 1246 // value will be populated with the request's response once the request completes 1247 // successfully. 1248 // 1249 // Use "Send" method on the returned Request to send the API call to the service. 1250 // the "output" return value is not valid until after Send returns without error. 1251 // 1252 // See PutContainerPolicy for more information on using the PutContainerPolicy 1253 // API call, and error handling. 1254 // 1255 // This method is useful when you want to inject custom logic or configuration 1256 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1257 // 1258 // 1259 // // Example sending a request using the PutContainerPolicyRequest method. 1260 // req, resp := client.PutContainerPolicyRequest(params) 1261 // 1262 // err := req.Send() 1263 // if err == nil { // resp is now filled 1264 // fmt.Println(resp) 1265 // } 1266 // 1267 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy 1268 func (c *MediaStore) PutContainerPolicyRequest(input *PutContainerPolicyInput) (req *request.Request, output *PutContainerPolicyOutput) { 1269 op := &request.Operation{ 1270 Name: opPutContainerPolicy, 1271 HTTPMethod: "POST", 1272 HTTPPath: "/", 1273 } 1274 1275 if input == nil { 1276 input = &PutContainerPolicyInput{} 1277 } 1278 1279 output = &PutContainerPolicyOutput{} 1280 req = c.newRequest(op, input, output) 1281 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1282 return 1283 } 1284 1285 // PutContainerPolicy API operation for AWS Elemental MediaStore. 1286 // 1287 // Creates an access policy for the specified container to restrict the users 1288 // and clients that can access it. For information about the data that is included 1289 // in an access policy, see the AWS Identity and Access Management User Guide 1290 // (https://aws.amazon.com/documentation/iam/). 1291 // 1292 // For this release of the REST API, you can create only one policy for a container. 1293 // If you enter PutContainerPolicy twice, the second command modifies the existing 1294 // policy. 1295 // 1296 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1297 // with awserr.Error's Code and Message methods to get detailed information about 1298 // the error. 1299 // 1300 // See the AWS API reference guide for AWS Elemental MediaStore's 1301 // API operation PutContainerPolicy for usage and error information. 1302 // 1303 // Returned Error Types: 1304 // * ContainerNotFoundException 1305 // The container that you specified in the request does not exist. 1306 // 1307 // * ContainerInUseException 1308 // The container that you specified in the request already exists or is being 1309 // updated. 1310 // 1311 // * InternalServerError 1312 // The service is temporarily unavailable. 1313 // 1314 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutContainerPolicy 1315 func (c *MediaStore) PutContainerPolicy(input *PutContainerPolicyInput) (*PutContainerPolicyOutput, error) { 1316 req, out := c.PutContainerPolicyRequest(input) 1317 return out, req.Send() 1318 } 1319 1320 // PutContainerPolicyWithContext is the same as PutContainerPolicy with the addition of 1321 // the ability to pass a context and additional request options. 1322 // 1323 // See PutContainerPolicy for details on how to use this API operation. 1324 // 1325 // The context must be non-nil and will be used for request cancellation. If 1326 // the context is nil a panic will occur. In the future the SDK may create 1327 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1328 // for more information on using Contexts. 1329 func (c *MediaStore) PutContainerPolicyWithContext(ctx aws.Context, input *PutContainerPolicyInput, opts ...request.Option) (*PutContainerPolicyOutput, error) { 1330 req, out := c.PutContainerPolicyRequest(input) 1331 req.SetContext(ctx) 1332 req.ApplyOptions(opts...) 1333 return out, req.Send() 1334 } 1335 1336 const opPutCorsPolicy = "PutCorsPolicy" 1337 1338 // PutCorsPolicyRequest generates a "aws/request.Request" representing the 1339 // client's request for the PutCorsPolicy operation. The "output" return 1340 // value will be populated with the request's response once the request completes 1341 // successfully. 1342 // 1343 // Use "Send" method on the returned Request to send the API call to the service. 1344 // the "output" return value is not valid until after Send returns without error. 1345 // 1346 // See PutCorsPolicy for more information on using the PutCorsPolicy 1347 // API call, and error handling. 1348 // 1349 // This method is useful when you want to inject custom logic or configuration 1350 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1351 // 1352 // 1353 // // Example sending a request using the PutCorsPolicyRequest method. 1354 // req, resp := client.PutCorsPolicyRequest(params) 1355 // 1356 // err := req.Send() 1357 // if err == nil { // resp is now filled 1358 // fmt.Println(resp) 1359 // } 1360 // 1361 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy 1362 func (c *MediaStore) PutCorsPolicyRequest(input *PutCorsPolicyInput) (req *request.Request, output *PutCorsPolicyOutput) { 1363 op := &request.Operation{ 1364 Name: opPutCorsPolicy, 1365 HTTPMethod: "POST", 1366 HTTPPath: "/", 1367 } 1368 1369 if input == nil { 1370 input = &PutCorsPolicyInput{} 1371 } 1372 1373 output = &PutCorsPolicyOutput{} 1374 req = c.newRequest(op, input, output) 1375 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1376 return 1377 } 1378 1379 // PutCorsPolicy API operation for AWS Elemental MediaStore. 1380 // 1381 // Sets the cross-origin resource sharing (CORS) configuration on a container 1382 // so that the container can service cross-origin requests. For example, you 1383 // might want to enable a request whose origin is http://www.example.com to 1384 // access your AWS Elemental MediaStore container at my.example.container.com 1385 // by using the browser's XMLHttpRequest capability. 1386 // 1387 // To enable CORS on a container, you attach a CORS policy to the container. 1388 // In the CORS policy, you configure rules that identify origins and the HTTP 1389 // methods that can be executed on your container. The policy can contain up 1390 // to 398,000 characters. You can add up to 100 rules to a CORS policy. If more 1391 // than one rule applies, the service uses the first applicable rule listed. 1392 // 1393 // To learn more about CORS, see Cross-Origin Resource Sharing (CORS) in AWS 1394 // Elemental MediaStore (https://docs.aws.amazon.com/mediastore/latest/ug/cors-policy.html). 1395 // 1396 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1397 // with awserr.Error's Code and Message methods to get detailed information about 1398 // the error. 1399 // 1400 // See the AWS API reference guide for AWS Elemental MediaStore's 1401 // API operation PutCorsPolicy for usage and error information. 1402 // 1403 // Returned Error Types: 1404 // * ContainerNotFoundException 1405 // The container that you specified in the request does not exist. 1406 // 1407 // * ContainerInUseException 1408 // The container that you specified in the request already exists or is being 1409 // updated. 1410 // 1411 // * InternalServerError 1412 // The service is temporarily unavailable. 1413 // 1414 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutCorsPolicy 1415 func (c *MediaStore) PutCorsPolicy(input *PutCorsPolicyInput) (*PutCorsPolicyOutput, error) { 1416 req, out := c.PutCorsPolicyRequest(input) 1417 return out, req.Send() 1418 } 1419 1420 // PutCorsPolicyWithContext is the same as PutCorsPolicy with the addition of 1421 // the ability to pass a context and additional request options. 1422 // 1423 // See PutCorsPolicy for details on how to use this API operation. 1424 // 1425 // The context must be non-nil and will be used for request cancellation. If 1426 // the context is nil a panic will occur. In the future the SDK may create 1427 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1428 // for more information on using Contexts. 1429 func (c *MediaStore) PutCorsPolicyWithContext(ctx aws.Context, input *PutCorsPolicyInput, opts ...request.Option) (*PutCorsPolicyOutput, error) { 1430 req, out := c.PutCorsPolicyRequest(input) 1431 req.SetContext(ctx) 1432 req.ApplyOptions(opts...) 1433 return out, req.Send() 1434 } 1435 1436 const opPutLifecyclePolicy = "PutLifecyclePolicy" 1437 1438 // PutLifecyclePolicyRequest generates a "aws/request.Request" representing the 1439 // client's request for the PutLifecyclePolicy operation. The "output" return 1440 // value will be populated with the request's response once the request completes 1441 // successfully. 1442 // 1443 // Use "Send" method on the returned Request to send the API call to the service. 1444 // the "output" return value is not valid until after Send returns without error. 1445 // 1446 // See PutLifecyclePolicy for more information on using the PutLifecyclePolicy 1447 // API call, and error handling. 1448 // 1449 // This method is useful when you want to inject custom logic or configuration 1450 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1451 // 1452 // 1453 // // Example sending a request using the PutLifecyclePolicyRequest method. 1454 // req, resp := client.PutLifecyclePolicyRequest(params) 1455 // 1456 // err := req.Send() 1457 // if err == nil { // resp is now filled 1458 // fmt.Println(resp) 1459 // } 1460 // 1461 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy 1462 func (c *MediaStore) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) { 1463 op := &request.Operation{ 1464 Name: opPutLifecyclePolicy, 1465 HTTPMethod: "POST", 1466 HTTPPath: "/", 1467 } 1468 1469 if input == nil { 1470 input = &PutLifecyclePolicyInput{} 1471 } 1472 1473 output = &PutLifecyclePolicyOutput{} 1474 req = c.newRequest(op, input, output) 1475 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1476 return 1477 } 1478 1479 // PutLifecyclePolicy API operation for AWS Elemental MediaStore. 1480 // 1481 // Writes an object lifecycle policy to a container. If the container already 1482 // has an object lifecycle policy, the service replaces the existing policy 1483 // with the new policy. It takes up to 20 minutes for the change to take effect. 1484 // 1485 // For information about how to construct an object lifecycle policy, see Components 1486 // of an Object Lifecycle Policy (https://docs.aws.amazon.com/mediastore/latest/ug/policies-object-lifecycle-components.html). 1487 // 1488 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1489 // with awserr.Error's Code and Message methods to get detailed information about 1490 // the error. 1491 // 1492 // See the AWS API reference guide for AWS Elemental MediaStore's 1493 // API operation PutLifecyclePolicy for usage and error information. 1494 // 1495 // Returned Error Types: 1496 // * ContainerInUseException 1497 // The container that you specified in the request already exists or is being 1498 // updated. 1499 // 1500 // * ContainerNotFoundException 1501 // The container that you specified in the request does not exist. 1502 // 1503 // * InternalServerError 1504 // The service is temporarily unavailable. 1505 // 1506 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutLifecyclePolicy 1507 func (c *MediaStore) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) { 1508 req, out := c.PutLifecyclePolicyRequest(input) 1509 return out, req.Send() 1510 } 1511 1512 // PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of 1513 // the ability to pass a context and additional request options. 1514 // 1515 // See PutLifecyclePolicy for details on how to use this API operation. 1516 // 1517 // The context must be non-nil and will be used for request cancellation. If 1518 // the context is nil a panic will occur. In the future the SDK may create 1519 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1520 // for more information on using Contexts. 1521 func (c *MediaStore) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) { 1522 req, out := c.PutLifecyclePolicyRequest(input) 1523 req.SetContext(ctx) 1524 req.ApplyOptions(opts...) 1525 return out, req.Send() 1526 } 1527 1528 const opPutMetricPolicy = "PutMetricPolicy" 1529 1530 // PutMetricPolicyRequest generates a "aws/request.Request" representing the 1531 // client's request for the PutMetricPolicy operation. The "output" return 1532 // value will be populated with the request's response once the request completes 1533 // successfully. 1534 // 1535 // Use "Send" method on the returned Request to send the API call to the service. 1536 // the "output" return value is not valid until after Send returns without error. 1537 // 1538 // See PutMetricPolicy for more information on using the PutMetricPolicy 1539 // API call, and error handling. 1540 // 1541 // This method is useful when you want to inject custom logic or configuration 1542 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1543 // 1544 // 1545 // // Example sending a request using the PutMetricPolicyRequest method. 1546 // req, resp := client.PutMetricPolicyRequest(params) 1547 // 1548 // err := req.Send() 1549 // if err == nil { // resp is now filled 1550 // fmt.Println(resp) 1551 // } 1552 // 1553 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutMetricPolicy 1554 func (c *MediaStore) PutMetricPolicyRequest(input *PutMetricPolicyInput) (req *request.Request, output *PutMetricPolicyOutput) { 1555 op := &request.Operation{ 1556 Name: opPutMetricPolicy, 1557 HTTPMethod: "POST", 1558 HTTPPath: "/", 1559 } 1560 1561 if input == nil { 1562 input = &PutMetricPolicyInput{} 1563 } 1564 1565 output = &PutMetricPolicyOutput{} 1566 req = c.newRequest(op, input, output) 1567 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1568 return 1569 } 1570 1571 // PutMetricPolicy API operation for AWS Elemental MediaStore. 1572 // 1573 // The metric policy that you want to add to the container. A metric policy 1574 // allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. It 1575 // takes up to 20 minutes for the new policy to take effect. 1576 // 1577 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1578 // with awserr.Error's Code and Message methods to get detailed information about 1579 // the error. 1580 // 1581 // See the AWS API reference guide for AWS Elemental MediaStore's 1582 // API operation PutMetricPolicy for usage and error information. 1583 // 1584 // Returned Error Types: 1585 // * ContainerInUseException 1586 // The container that you specified in the request already exists or is being 1587 // updated. 1588 // 1589 // * ContainerNotFoundException 1590 // The container that you specified in the request does not exist. 1591 // 1592 // * InternalServerError 1593 // The service is temporarily unavailable. 1594 // 1595 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/PutMetricPolicy 1596 func (c *MediaStore) PutMetricPolicy(input *PutMetricPolicyInput) (*PutMetricPolicyOutput, error) { 1597 req, out := c.PutMetricPolicyRequest(input) 1598 return out, req.Send() 1599 } 1600 1601 // PutMetricPolicyWithContext is the same as PutMetricPolicy with the addition of 1602 // the ability to pass a context and additional request options. 1603 // 1604 // See PutMetricPolicy for details on how to use this API operation. 1605 // 1606 // The context must be non-nil and will be used for request cancellation. If 1607 // the context is nil a panic will occur. In the future the SDK may create 1608 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1609 // for more information on using Contexts. 1610 func (c *MediaStore) PutMetricPolicyWithContext(ctx aws.Context, input *PutMetricPolicyInput, opts ...request.Option) (*PutMetricPolicyOutput, error) { 1611 req, out := c.PutMetricPolicyRequest(input) 1612 req.SetContext(ctx) 1613 req.ApplyOptions(opts...) 1614 return out, req.Send() 1615 } 1616 1617 const opStartAccessLogging = "StartAccessLogging" 1618 1619 // StartAccessLoggingRequest generates a "aws/request.Request" representing the 1620 // client's request for the StartAccessLogging operation. The "output" return 1621 // value will be populated with the request's response once the request completes 1622 // successfully. 1623 // 1624 // Use "Send" method on the returned Request to send the API call to the service. 1625 // the "output" return value is not valid until after Send returns without error. 1626 // 1627 // See StartAccessLogging for more information on using the StartAccessLogging 1628 // API call, and error handling. 1629 // 1630 // This method is useful when you want to inject custom logic or configuration 1631 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1632 // 1633 // 1634 // // Example sending a request using the StartAccessLoggingRequest method. 1635 // req, resp := client.StartAccessLoggingRequest(params) 1636 // 1637 // err := req.Send() 1638 // if err == nil { // resp is now filled 1639 // fmt.Println(resp) 1640 // } 1641 // 1642 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StartAccessLogging 1643 func (c *MediaStore) StartAccessLoggingRequest(input *StartAccessLoggingInput) (req *request.Request, output *StartAccessLoggingOutput) { 1644 op := &request.Operation{ 1645 Name: opStartAccessLogging, 1646 HTTPMethod: "POST", 1647 HTTPPath: "/", 1648 } 1649 1650 if input == nil { 1651 input = &StartAccessLoggingInput{} 1652 } 1653 1654 output = &StartAccessLoggingOutput{} 1655 req = c.newRequest(op, input, output) 1656 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1657 return 1658 } 1659 1660 // StartAccessLogging API operation for AWS Elemental MediaStore. 1661 // 1662 // Starts access logging on the specified container. When you enable access 1663 // logging on a container, MediaStore delivers access logs for objects stored 1664 // in that container to Amazon CloudWatch Logs. 1665 // 1666 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1667 // with awserr.Error's Code and Message methods to get detailed information about 1668 // the error. 1669 // 1670 // See the AWS API reference guide for AWS Elemental MediaStore's 1671 // API operation StartAccessLogging for usage and error information. 1672 // 1673 // Returned Error Types: 1674 // * ContainerInUseException 1675 // The container that you specified in the request already exists or is being 1676 // updated. 1677 // 1678 // * ContainerNotFoundException 1679 // The container that you specified in the request does not exist. 1680 // 1681 // * InternalServerError 1682 // The service is temporarily unavailable. 1683 // 1684 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StartAccessLogging 1685 func (c *MediaStore) StartAccessLogging(input *StartAccessLoggingInput) (*StartAccessLoggingOutput, error) { 1686 req, out := c.StartAccessLoggingRequest(input) 1687 return out, req.Send() 1688 } 1689 1690 // StartAccessLoggingWithContext is the same as StartAccessLogging with the addition of 1691 // the ability to pass a context and additional request options. 1692 // 1693 // See StartAccessLogging for details on how to use this API operation. 1694 // 1695 // The context must be non-nil and will be used for request cancellation. If 1696 // the context is nil a panic will occur. In the future the SDK may create 1697 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1698 // for more information on using Contexts. 1699 func (c *MediaStore) StartAccessLoggingWithContext(ctx aws.Context, input *StartAccessLoggingInput, opts ...request.Option) (*StartAccessLoggingOutput, error) { 1700 req, out := c.StartAccessLoggingRequest(input) 1701 req.SetContext(ctx) 1702 req.ApplyOptions(opts...) 1703 return out, req.Send() 1704 } 1705 1706 const opStopAccessLogging = "StopAccessLogging" 1707 1708 // StopAccessLoggingRequest generates a "aws/request.Request" representing the 1709 // client's request for the StopAccessLogging operation. The "output" return 1710 // value will be populated with the request's response once the request completes 1711 // successfully. 1712 // 1713 // Use "Send" method on the returned Request to send the API call to the service. 1714 // the "output" return value is not valid until after Send returns without error. 1715 // 1716 // See StopAccessLogging for more information on using the StopAccessLogging 1717 // API call, and error handling. 1718 // 1719 // This method is useful when you want to inject custom logic or configuration 1720 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1721 // 1722 // 1723 // // Example sending a request using the StopAccessLoggingRequest method. 1724 // req, resp := client.StopAccessLoggingRequest(params) 1725 // 1726 // err := req.Send() 1727 // if err == nil { // resp is now filled 1728 // fmt.Println(resp) 1729 // } 1730 // 1731 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StopAccessLogging 1732 func (c *MediaStore) StopAccessLoggingRequest(input *StopAccessLoggingInput) (req *request.Request, output *StopAccessLoggingOutput) { 1733 op := &request.Operation{ 1734 Name: opStopAccessLogging, 1735 HTTPMethod: "POST", 1736 HTTPPath: "/", 1737 } 1738 1739 if input == nil { 1740 input = &StopAccessLoggingInput{} 1741 } 1742 1743 output = &StopAccessLoggingOutput{} 1744 req = c.newRequest(op, input, output) 1745 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1746 return 1747 } 1748 1749 // StopAccessLogging API operation for AWS Elemental MediaStore. 1750 // 1751 // Stops access logging on the specified container. When you stop access logging 1752 // on a container, MediaStore stops sending access logs to Amazon CloudWatch 1753 // Logs. These access logs are not saved and are not retrievable. 1754 // 1755 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1756 // with awserr.Error's Code and Message methods to get detailed information about 1757 // the error. 1758 // 1759 // See the AWS API reference guide for AWS Elemental MediaStore's 1760 // API operation StopAccessLogging for usage and error information. 1761 // 1762 // Returned Error Types: 1763 // * ContainerInUseException 1764 // The container that you specified in the request already exists or is being 1765 // updated. 1766 // 1767 // * ContainerNotFoundException 1768 // The container that you specified in the request does not exist. 1769 // 1770 // * InternalServerError 1771 // The service is temporarily unavailable. 1772 // 1773 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/StopAccessLogging 1774 func (c *MediaStore) StopAccessLogging(input *StopAccessLoggingInput) (*StopAccessLoggingOutput, error) { 1775 req, out := c.StopAccessLoggingRequest(input) 1776 return out, req.Send() 1777 } 1778 1779 // StopAccessLoggingWithContext is the same as StopAccessLogging with the addition of 1780 // the ability to pass a context and additional request options. 1781 // 1782 // See StopAccessLogging for details on how to use this API operation. 1783 // 1784 // The context must be non-nil and will be used for request cancellation. If 1785 // the context is nil a panic will occur. In the future the SDK may create 1786 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1787 // for more information on using Contexts. 1788 func (c *MediaStore) StopAccessLoggingWithContext(ctx aws.Context, input *StopAccessLoggingInput, opts ...request.Option) (*StopAccessLoggingOutput, error) { 1789 req, out := c.StopAccessLoggingRequest(input) 1790 req.SetContext(ctx) 1791 req.ApplyOptions(opts...) 1792 return out, req.Send() 1793 } 1794 1795 const opTagResource = "TagResource" 1796 1797 // TagResourceRequest generates a "aws/request.Request" representing the 1798 // client's request for the TagResource operation. The "output" return 1799 // value will be populated with the request's response once the request completes 1800 // successfully. 1801 // 1802 // Use "Send" method on the returned Request to send the API call to the service. 1803 // the "output" return value is not valid until after Send returns without error. 1804 // 1805 // See TagResource for more information on using the TagResource 1806 // API call, and error handling. 1807 // 1808 // This method is useful when you want to inject custom logic or configuration 1809 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1810 // 1811 // 1812 // // Example sending a request using the TagResourceRequest method. 1813 // req, resp := client.TagResourceRequest(params) 1814 // 1815 // err := req.Send() 1816 // if err == nil { // resp is now filled 1817 // fmt.Println(resp) 1818 // } 1819 // 1820 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/TagResource 1821 func (c *MediaStore) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1822 op := &request.Operation{ 1823 Name: opTagResource, 1824 HTTPMethod: "POST", 1825 HTTPPath: "/", 1826 } 1827 1828 if input == nil { 1829 input = &TagResourceInput{} 1830 } 1831 1832 output = &TagResourceOutput{} 1833 req = c.newRequest(op, input, output) 1834 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1835 return 1836 } 1837 1838 // TagResource API operation for AWS Elemental MediaStore. 1839 // 1840 // Adds tags to the specified AWS Elemental MediaStore container. Tags are key:value 1841 // pairs that you can associate with AWS resources. For example, the tag key 1842 // might be "customer" and the tag value might be "companyA." You can specify 1843 // one or more tags to add to each container. You can add up to 50 tags to each 1844 // container. For more information about tagging, including naming and usage 1845 // conventions, see Tagging Resources in MediaStore (https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html). 1846 // 1847 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1848 // with awserr.Error's Code and Message methods to get detailed information about 1849 // the error. 1850 // 1851 // See the AWS API reference guide for AWS Elemental MediaStore's 1852 // API operation TagResource for usage and error information. 1853 // 1854 // Returned Error Types: 1855 // * ContainerInUseException 1856 // The container that you specified in the request already exists or is being 1857 // updated. 1858 // 1859 // * ContainerNotFoundException 1860 // The container that you specified in the request does not exist. 1861 // 1862 // * InternalServerError 1863 // The service is temporarily unavailable. 1864 // 1865 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/TagResource 1866 func (c *MediaStore) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1867 req, out := c.TagResourceRequest(input) 1868 return out, req.Send() 1869 } 1870 1871 // TagResourceWithContext is the same as TagResource with the addition of 1872 // the ability to pass a context and additional request options. 1873 // 1874 // See TagResource for details on how to use this API operation. 1875 // 1876 // The context must be non-nil and will be used for request cancellation. If 1877 // the context is nil a panic will occur. In the future the SDK may create 1878 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1879 // for more information on using Contexts. 1880 func (c *MediaStore) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1881 req, out := c.TagResourceRequest(input) 1882 req.SetContext(ctx) 1883 req.ApplyOptions(opts...) 1884 return out, req.Send() 1885 } 1886 1887 const opUntagResource = "UntagResource" 1888 1889 // UntagResourceRequest generates a "aws/request.Request" representing the 1890 // client's request for the UntagResource operation. The "output" return 1891 // value will be populated with the request's response once the request completes 1892 // successfully. 1893 // 1894 // Use "Send" method on the returned Request to send the API call to the service. 1895 // the "output" return value is not valid until after Send returns without error. 1896 // 1897 // See UntagResource for more information on using the UntagResource 1898 // API call, and error handling. 1899 // 1900 // This method is useful when you want to inject custom logic or configuration 1901 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1902 // 1903 // 1904 // // Example sending a request using the UntagResourceRequest method. 1905 // req, resp := client.UntagResourceRequest(params) 1906 // 1907 // err := req.Send() 1908 // if err == nil { // resp is now filled 1909 // fmt.Println(resp) 1910 // } 1911 // 1912 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/UntagResource 1913 func (c *MediaStore) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1914 op := &request.Operation{ 1915 Name: opUntagResource, 1916 HTTPMethod: "POST", 1917 HTTPPath: "/", 1918 } 1919 1920 if input == nil { 1921 input = &UntagResourceInput{} 1922 } 1923 1924 output = &UntagResourceOutput{} 1925 req = c.newRequest(op, input, output) 1926 req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1927 return 1928 } 1929 1930 // UntagResource API operation for AWS Elemental MediaStore. 1931 // 1932 // Removes tags from the specified container. You can specify one or more tags 1933 // to remove. 1934 // 1935 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1936 // with awserr.Error's Code and Message methods to get detailed information about 1937 // the error. 1938 // 1939 // See the AWS API reference guide for AWS Elemental MediaStore's 1940 // API operation UntagResource for usage and error information. 1941 // 1942 // Returned Error Types: 1943 // * ContainerInUseException 1944 // The container that you specified in the request already exists or is being 1945 // updated. 1946 // 1947 // * ContainerNotFoundException 1948 // The container that you specified in the request does not exist. 1949 // 1950 // * InternalServerError 1951 // The service is temporarily unavailable. 1952 // 1953 // See also, https://docs.aws.amazon.com/goto/WebAPI/mediastore-2017-09-01/UntagResource 1954 func (c *MediaStore) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1955 req, out := c.UntagResourceRequest(input) 1956 return out, req.Send() 1957 } 1958 1959 // UntagResourceWithContext is the same as UntagResource with the addition of 1960 // the ability to pass a context and additional request options. 1961 // 1962 // See UntagResource for details on how to use this API operation. 1963 // 1964 // The context must be non-nil and will be used for request cancellation. If 1965 // the context is nil a panic will occur. In the future the SDK may create 1966 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1967 // for more information on using Contexts. 1968 func (c *MediaStore) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1969 req, out := c.UntagResourceRequest(input) 1970 req.SetContext(ctx) 1971 req.ApplyOptions(opts...) 1972 return out, req.Send() 1973 } 1974 1975 // This section describes operations that you can perform on an AWS Elemental 1976 // MediaStore container. 1977 type Container struct { 1978 _ struct{} `type:"structure"` 1979 1980 // The Amazon Resource Name (ARN) of the container. The ARN has the following 1981 // format: 1982 // 1983 // arn:aws:<region>:<account that owns this container>:container/<name of container> 1984 // 1985 // For example: arn:aws:mediastore:us-west-2:111122223333:container/movies 1986 ARN *string `min:"1" type:"string"` 1987 1988 // The state of access logging on the container. This value is false by default, 1989 // indicating that AWS Elemental MediaStore does not send access logs to Amazon 1990 // CloudWatch Logs. When you enable access logging on the container, MediaStore 1991 // changes this value to true, indicating that the service delivers access logs 1992 // for objects stored in that container to CloudWatch Logs. 1993 AccessLoggingEnabled *bool `type:"boolean"` 1994 1995 // Unix timestamp. 1996 CreationTime *time.Time `type:"timestamp"` 1997 1998 // The DNS endpoint of the container. Use the endpoint to identify the specific 1999 // container when sending requests to the data plane. The service assigns this 2000 // value when the container is created. Once the value has been assigned, it 2001 // does not change. 2002 Endpoint *string `min:"1" type:"string"` 2003 2004 // The name of the container. 2005 Name *string `min:"1" type:"string"` 2006 2007 // The status of container creation or deletion. The status is one of the following: 2008 // CREATING, ACTIVE, or DELETING. While the service is creating the container, 2009 // the status is CREATING. When the endpoint is available, the status changes 2010 // to ACTIVE. 2011 Status *string `min:"1" type:"string" enum:"ContainerStatus"` 2012 } 2013 2014 // String returns the string representation. 2015 // 2016 // API parameter values that are decorated as "sensitive" in the API will not 2017 // be included in the string output. The member name will be present, but the 2018 // value will be replaced with "sensitive". 2019 func (s Container) String() string { 2020 return awsutil.Prettify(s) 2021 } 2022 2023 // GoString returns the string representation. 2024 // 2025 // API parameter values that are decorated as "sensitive" in the API will not 2026 // be included in the string output. The member name will be present, but the 2027 // value will be replaced with "sensitive". 2028 func (s Container) GoString() string { 2029 return s.String() 2030 } 2031 2032 // SetARN sets the ARN field's value. 2033 func (s *Container) SetARN(v string) *Container { 2034 s.ARN = &v 2035 return s 2036 } 2037 2038 // SetAccessLoggingEnabled sets the AccessLoggingEnabled field's value. 2039 func (s *Container) SetAccessLoggingEnabled(v bool) *Container { 2040 s.AccessLoggingEnabled = &v 2041 return s 2042 } 2043 2044 // SetCreationTime sets the CreationTime field's value. 2045 func (s *Container) SetCreationTime(v time.Time) *Container { 2046 s.CreationTime = &v 2047 return s 2048 } 2049 2050 // SetEndpoint sets the Endpoint field's value. 2051 func (s *Container) SetEndpoint(v string) *Container { 2052 s.Endpoint = &v 2053 return s 2054 } 2055 2056 // SetName sets the Name field's value. 2057 func (s *Container) SetName(v string) *Container { 2058 s.Name = &v 2059 return s 2060 } 2061 2062 // SetStatus sets the Status field's value. 2063 func (s *Container) SetStatus(v string) *Container { 2064 s.Status = &v 2065 return s 2066 } 2067 2068 // The container that you specified in the request already exists or is being 2069 // updated. 2070 type ContainerInUseException struct { 2071 _ struct{} `type:"structure"` 2072 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2073 2074 Message_ *string `locationName:"Message" min:"1" type:"string"` 2075 } 2076 2077 // String returns the string representation. 2078 // 2079 // API parameter values that are decorated as "sensitive" in the API will not 2080 // be included in the string output. The member name will be present, but the 2081 // value will be replaced with "sensitive". 2082 func (s ContainerInUseException) String() string { 2083 return awsutil.Prettify(s) 2084 } 2085 2086 // GoString returns the string representation. 2087 // 2088 // API parameter values that are decorated as "sensitive" in the API will not 2089 // be included in the string output. The member name will be present, but the 2090 // value will be replaced with "sensitive". 2091 func (s ContainerInUseException) GoString() string { 2092 return s.String() 2093 } 2094 2095 func newErrorContainerInUseException(v protocol.ResponseMetadata) error { 2096 return &ContainerInUseException{ 2097 RespMetadata: v, 2098 } 2099 } 2100 2101 // Code returns the exception type name. 2102 func (s *ContainerInUseException) Code() string { 2103 return "ContainerInUseException" 2104 } 2105 2106 // Message returns the exception's message. 2107 func (s *ContainerInUseException) Message() string { 2108 if s.Message_ != nil { 2109 return *s.Message_ 2110 } 2111 return "" 2112 } 2113 2114 // OrigErr always returns nil, satisfies awserr.Error interface. 2115 func (s *ContainerInUseException) OrigErr() error { 2116 return nil 2117 } 2118 2119 func (s *ContainerInUseException) Error() string { 2120 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2121 } 2122 2123 // Status code returns the HTTP status code for the request's response error. 2124 func (s *ContainerInUseException) StatusCode() int { 2125 return s.RespMetadata.StatusCode 2126 } 2127 2128 // RequestID returns the service's response RequestID for request. 2129 func (s *ContainerInUseException) RequestID() string { 2130 return s.RespMetadata.RequestID 2131 } 2132 2133 // The container that you specified in the request does not exist. 2134 type ContainerNotFoundException struct { 2135 _ struct{} `type:"structure"` 2136 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2137 2138 Message_ *string `locationName:"Message" min:"1" type:"string"` 2139 } 2140 2141 // String returns the string representation. 2142 // 2143 // API parameter values that are decorated as "sensitive" in the API will not 2144 // be included in the string output. The member name will be present, but the 2145 // value will be replaced with "sensitive". 2146 func (s ContainerNotFoundException) String() string { 2147 return awsutil.Prettify(s) 2148 } 2149 2150 // GoString returns the string representation. 2151 // 2152 // API parameter values that are decorated as "sensitive" in the API will not 2153 // be included in the string output. The member name will be present, but the 2154 // value will be replaced with "sensitive". 2155 func (s ContainerNotFoundException) GoString() string { 2156 return s.String() 2157 } 2158 2159 func newErrorContainerNotFoundException(v protocol.ResponseMetadata) error { 2160 return &ContainerNotFoundException{ 2161 RespMetadata: v, 2162 } 2163 } 2164 2165 // Code returns the exception type name. 2166 func (s *ContainerNotFoundException) Code() string { 2167 return "ContainerNotFoundException" 2168 } 2169 2170 // Message returns the exception's message. 2171 func (s *ContainerNotFoundException) Message() string { 2172 if s.Message_ != nil { 2173 return *s.Message_ 2174 } 2175 return "" 2176 } 2177 2178 // OrigErr always returns nil, satisfies awserr.Error interface. 2179 func (s *ContainerNotFoundException) OrigErr() error { 2180 return nil 2181 } 2182 2183 func (s *ContainerNotFoundException) Error() string { 2184 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2185 } 2186 2187 // Status code returns the HTTP status code for the request's response error. 2188 func (s *ContainerNotFoundException) StatusCode() int { 2189 return s.RespMetadata.StatusCode 2190 } 2191 2192 // RequestID returns the service's response RequestID for request. 2193 func (s *ContainerNotFoundException) RequestID() string { 2194 return s.RespMetadata.RequestID 2195 } 2196 2197 // The CORS policy that you specified in the request does not exist. 2198 type CorsPolicyNotFoundException struct { 2199 _ struct{} `type:"structure"` 2200 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2201 2202 Message_ *string `locationName:"Message" min:"1" type:"string"` 2203 } 2204 2205 // String returns the string representation. 2206 // 2207 // API parameter values that are decorated as "sensitive" in the API will not 2208 // be included in the string output. The member name will be present, but the 2209 // value will be replaced with "sensitive". 2210 func (s CorsPolicyNotFoundException) String() string { 2211 return awsutil.Prettify(s) 2212 } 2213 2214 // GoString returns the string representation. 2215 // 2216 // API parameter values that are decorated as "sensitive" in the API will not 2217 // be included in the string output. The member name will be present, but the 2218 // value will be replaced with "sensitive". 2219 func (s CorsPolicyNotFoundException) GoString() string { 2220 return s.String() 2221 } 2222 2223 func newErrorCorsPolicyNotFoundException(v protocol.ResponseMetadata) error { 2224 return &CorsPolicyNotFoundException{ 2225 RespMetadata: v, 2226 } 2227 } 2228 2229 // Code returns the exception type name. 2230 func (s *CorsPolicyNotFoundException) Code() string { 2231 return "CorsPolicyNotFoundException" 2232 } 2233 2234 // Message returns the exception's message. 2235 func (s *CorsPolicyNotFoundException) Message() string { 2236 if s.Message_ != nil { 2237 return *s.Message_ 2238 } 2239 return "" 2240 } 2241 2242 // OrigErr always returns nil, satisfies awserr.Error interface. 2243 func (s *CorsPolicyNotFoundException) OrigErr() error { 2244 return nil 2245 } 2246 2247 func (s *CorsPolicyNotFoundException) Error() string { 2248 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2249 } 2250 2251 // Status code returns the HTTP status code for the request's response error. 2252 func (s *CorsPolicyNotFoundException) StatusCode() int { 2253 return s.RespMetadata.StatusCode 2254 } 2255 2256 // RequestID returns the service's response RequestID for request. 2257 func (s *CorsPolicyNotFoundException) RequestID() string { 2258 return s.RespMetadata.RequestID 2259 } 2260 2261 // A rule for a CORS policy. You can add up to 100 rules to a CORS policy. If 2262 // more than one rule applies, the service uses the first applicable rule listed. 2263 type CorsRule struct { 2264 _ struct{} `type:"structure"` 2265 2266 // Specifies which headers are allowed in a preflight OPTIONS request through 2267 // the Access-Control-Request-Headers header. Each header name that is specified 2268 // in Access-Control-Request-Headers must have a corresponding entry in the 2269 // rule. Only the headers that were requested are sent back. 2270 // 2271 // This element can contain only one wildcard character (*). 2272 // 2273 // AllowedHeaders is a required field 2274 AllowedHeaders []*string `type:"list" required:"true"` 2275 2276 // Identifies an HTTP method that the origin that is specified in the rule is 2277 // allowed to execute. 2278 // 2279 // Each CORS rule must contain at least one AllowedMethods and one AllowedOrigins 2280 // element. 2281 AllowedMethods []*string `min:"1" type:"list"` 2282 2283 // One or more response headers that you want users to be able to access from 2284 // their applications (for example, from a JavaScript XMLHttpRequest object). 2285 // 2286 // Each CORS rule must have at least one AllowedOrigins element. The string 2287 // value can include only one wildcard character (*), for example, http://*.example.com. 2288 // Additionally, you can specify only one wildcard character to allow cross-origin 2289 // access for all origins. 2290 // 2291 // AllowedOrigins is a required field 2292 AllowedOrigins []*string `min:"1" type:"list" required:"true"` 2293 2294 // One or more headers in the response that you want users to be able to access 2295 // from their applications (for example, from a JavaScript XMLHttpRequest object). 2296 // 2297 // This element is optional for each rule. 2298 ExposeHeaders []*string `type:"list"` 2299 2300 // The time in seconds that your browser caches the preflight response for the 2301 // specified resource. 2302 // 2303 // A CORS rule can have only one MaxAgeSeconds element. 2304 MaxAgeSeconds *int64 `type:"integer"` 2305 } 2306 2307 // String returns the string representation. 2308 // 2309 // API parameter values that are decorated as "sensitive" in the API will not 2310 // be included in the string output. The member name will be present, but the 2311 // value will be replaced with "sensitive". 2312 func (s CorsRule) String() string { 2313 return awsutil.Prettify(s) 2314 } 2315 2316 // GoString returns the string representation. 2317 // 2318 // API parameter values that are decorated as "sensitive" in the API will not 2319 // be included in the string output. The member name will be present, but the 2320 // value will be replaced with "sensitive". 2321 func (s CorsRule) GoString() string { 2322 return s.String() 2323 } 2324 2325 // Validate inspects the fields of the type to determine if they are valid. 2326 func (s *CorsRule) Validate() error { 2327 invalidParams := request.ErrInvalidParams{Context: "CorsRule"} 2328 if s.AllowedHeaders == nil { 2329 invalidParams.Add(request.NewErrParamRequired("AllowedHeaders")) 2330 } 2331 if s.AllowedMethods != nil && len(s.AllowedMethods) < 1 { 2332 invalidParams.Add(request.NewErrParamMinLen("AllowedMethods", 1)) 2333 } 2334 if s.AllowedOrigins == nil { 2335 invalidParams.Add(request.NewErrParamRequired("AllowedOrigins")) 2336 } 2337 if s.AllowedOrigins != nil && len(s.AllowedOrigins) < 1 { 2338 invalidParams.Add(request.NewErrParamMinLen("AllowedOrigins", 1)) 2339 } 2340 2341 if invalidParams.Len() > 0 { 2342 return invalidParams 2343 } 2344 return nil 2345 } 2346 2347 // SetAllowedHeaders sets the AllowedHeaders field's value. 2348 func (s *CorsRule) SetAllowedHeaders(v []*string) *CorsRule { 2349 s.AllowedHeaders = v 2350 return s 2351 } 2352 2353 // SetAllowedMethods sets the AllowedMethods field's value. 2354 func (s *CorsRule) SetAllowedMethods(v []*string) *CorsRule { 2355 s.AllowedMethods = v 2356 return s 2357 } 2358 2359 // SetAllowedOrigins sets the AllowedOrigins field's value. 2360 func (s *CorsRule) SetAllowedOrigins(v []*string) *CorsRule { 2361 s.AllowedOrigins = v 2362 return s 2363 } 2364 2365 // SetExposeHeaders sets the ExposeHeaders field's value. 2366 func (s *CorsRule) SetExposeHeaders(v []*string) *CorsRule { 2367 s.ExposeHeaders = v 2368 return s 2369 } 2370 2371 // SetMaxAgeSeconds sets the MaxAgeSeconds field's value. 2372 func (s *CorsRule) SetMaxAgeSeconds(v int64) *CorsRule { 2373 s.MaxAgeSeconds = &v 2374 return s 2375 } 2376 2377 type CreateContainerInput struct { 2378 _ struct{} `type:"structure"` 2379 2380 // The name for the container. The name must be from 1 to 255 characters. Container 2381 // names must be unique to your AWS account within a specific region. As an 2382 // example, you could create a container named movies in every region, as long 2383 // as you don’t have an existing container with that name. 2384 // 2385 // ContainerName is a required field 2386 ContainerName *string `min:"1" type:"string" required:"true"` 2387 2388 // An array of key:value pairs that you define. These values can be anything 2389 // that you want. Typically, the tag key represents a category (such as "environment") 2390 // and the tag value represents a specific value within that category (such 2391 // as "test," "development," or "production"). You can add up to 50 tags to 2392 // each container. For more information about tagging, including naming and 2393 // usage conventions, see Tagging Resources in MediaStore (https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html). 2394 Tags []*Tag `min:"1" type:"list"` 2395 } 2396 2397 // String returns the string representation. 2398 // 2399 // API parameter values that are decorated as "sensitive" in the API will not 2400 // be included in the string output. The member name will be present, but the 2401 // value will be replaced with "sensitive". 2402 func (s CreateContainerInput) String() string { 2403 return awsutil.Prettify(s) 2404 } 2405 2406 // GoString returns the string representation. 2407 // 2408 // API parameter values that are decorated as "sensitive" in the API will not 2409 // be included in the string output. The member name will be present, but the 2410 // value will be replaced with "sensitive". 2411 func (s CreateContainerInput) GoString() string { 2412 return s.String() 2413 } 2414 2415 // Validate inspects the fields of the type to determine if they are valid. 2416 func (s *CreateContainerInput) Validate() error { 2417 invalidParams := request.ErrInvalidParams{Context: "CreateContainerInput"} 2418 if s.ContainerName == nil { 2419 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2420 } 2421 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2422 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2423 } 2424 if s.Tags != nil && len(s.Tags) < 1 { 2425 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 2426 } 2427 if s.Tags != nil { 2428 for i, v := range s.Tags { 2429 if v == nil { 2430 continue 2431 } 2432 if err := v.Validate(); err != nil { 2433 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 2434 } 2435 } 2436 } 2437 2438 if invalidParams.Len() > 0 { 2439 return invalidParams 2440 } 2441 return nil 2442 } 2443 2444 // SetContainerName sets the ContainerName field's value. 2445 func (s *CreateContainerInput) SetContainerName(v string) *CreateContainerInput { 2446 s.ContainerName = &v 2447 return s 2448 } 2449 2450 // SetTags sets the Tags field's value. 2451 func (s *CreateContainerInput) SetTags(v []*Tag) *CreateContainerInput { 2452 s.Tags = v 2453 return s 2454 } 2455 2456 type CreateContainerOutput struct { 2457 _ struct{} `type:"structure"` 2458 2459 // ContainerARN: The Amazon Resource Name (ARN) of the newly created container. 2460 // The ARN has the following format: arn:aws:<region>:<account that owns this 2461 // container>:container/<name of container>. For example: arn:aws:mediastore:us-west-2:111122223333:container/movies 2462 // 2463 // ContainerName: The container name as specified in the request. 2464 // 2465 // CreationTime: Unix time stamp. 2466 // 2467 // Status: The status of container creation or deletion. The status is one of 2468 // the following: CREATING, ACTIVE, or DELETING. While the service is creating 2469 // the container, the status is CREATING. When an endpoint is available, the 2470 // status changes to ACTIVE. 2471 // 2472 // The return value does not include the container's endpoint. To make downstream 2473 // requests, you must obtain this value by using DescribeContainer or ListContainers. 2474 // 2475 // Container is a required field 2476 Container *Container `type:"structure" required:"true"` 2477 } 2478 2479 // String returns the string representation. 2480 // 2481 // API parameter values that are decorated as "sensitive" in the API will not 2482 // be included in the string output. The member name will be present, but the 2483 // value will be replaced with "sensitive". 2484 func (s CreateContainerOutput) String() string { 2485 return awsutil.Prettify(s) 2486 } 2487 2488 // GoString returns the string representation. 2489 // 2490 // API parameter values that are decorated as "sensitive" in the API will not 2491 // be included in the string output. The member name will be present, but the 2492 // value will be replaced with "sensitive". 2493 func (s CreateContainerOutput) GoString() string { 2494 return s.String() 2495 } 2496 2497 // SetContainer sets the Container field's value. 2498 func (s *CreateContainerOutput) SetContainer(v *Container) *CreateContainerOutput { 2499 s.Container = v 2500 return s 2501 } 2502 2503 type DeleteContainerInput struct { 2504 _ struct{} `type:"structure"` 2505 2506 // The name of the container to delete. 2507 // 2508 // ContainerName is a required field 2509 ContainerName *string `min:"1" type:"string" required:"true"` 2510 } 2511 2512 // String returns the string representation. 2513 // 2514 // API parameter values that are decorated as "sensitive" in the API will not 2515 // be included in the string output. The member name will be present, but the 2516 // value will be replaced with "sensitive". 2517 func (s DeleteContainerInput) String() string { 2518 return awsutil.Prettify(s) 2519 } 2520 2521 // GoString returns the string representation. 2522 // 2523 // API parameter values that are decorated as "sensitive" in the API will not 2524 // be included in the string output. The member name will be present, but the 2525 // value will be replaced with "sensitive". 2526 func (s DeleteContainerInput) GoString() string { 2527 return s.String() 2528 } 2529 2530 // Validate inspects the fields of the type to determine if they are valid. 2531 func (s *DeleteContainerInput) Validate() error { 2532 invalidParams := request.ErrInvalidParams{Context: "DeleteContainerInput"} 2533 if s.ContainerName == nil { 2534 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2535 } 2536 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2537 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2538 } 2539 2540 if invalidParams.Len() > 0 { 2541 return invalidParams 2542 } 2543 return nil 2544 } 2545 2546 // SetContainerName sets the ContainerName field's value. 2547 func (s *DeleteContainerInput) SetContainerName(v string) *DeleteContainerInput { 2548 s.ContainerName = &v 2549 return s 2550 } 2551 2552 type DeleteContainerOutput struct { 2553 _ struct{} `type:"structure"` 2554 } 2555 2556 // String returns the string representation. 2557 // 2558 // API parameter values that are decorated as "sensitive" in the API will not 2559 // be included in the string output. The member name will be present, but the 2560 // value will be replaced with "sensitive". 2561 func (s DeleteContainerOutput) String() string { 2562 return awsutil.Prettify(s) 2563 } 2564 2565 // GoString returns the string representation. 2566 // 2567 // API parameter values that are decorated as "sensitive" in the API will not 2568 // be included in the string output. The member name will be present, but the 2569 // value will be replaced with "sensitive". 2570 func (s DeleteContainerOutput) GoString() string { 2571 return s.String() 2572 } 2573 2574 type DeleteContainerPolicyInput struct { 2575 _ struct{} `type:"structure"` 2576 2577 // The name of the container that holds the policy. 2578 // 2579 // ContainerName is a required field 2580 ContainerName *string `min:"1" type:"string" required:"true"` 2581 } 2582 2583 // String returns the string representation. 2584 // 2585 // API parameter values that are decorated as "sensitive" in the API will not 2586 // be included in the string output. The member name will be present, but the 2587 // value will be replaced with "sensitive". 2588 func (s DeleteContainerPolicyInput) String() string { 2589 return awsutil.Prettify(s) 2590 } 2591 2592 // GoString returns the string representation. 2593 // 2594 // API parameter values that are decorated as "sensitive" in the API will not 2595 // be included in the string output. The member name will be present, but the 2596 // value will be replaced with "sensitive". 2597 func (s DeleteContainerPolicyInput) GoString() string { 2598 return s.String() 2599 } 2600 2601 // Validate inspects the fields of the type to determine if they are valid. 2602 func (s *DeleteContainerPolicyInput) Validate() error { 2603 invalidParams := request.ErrInvalidParams{Context: "DeleteContainerPolicyInput"} 2604 if s.ContainerName == nil { 2605 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2606 } 2607 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2608 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2609 } 2610 2611 if invalidParams.Len() > 0 { 2612 return invalidParams 2613 } 2614 return nil 2615 } 2616 2617 // SetContainerName sets the ContainerName field's value. 2618 func (s *DeleteContainerPolicyInput) SetContainerName(v string) *DeleteContainerPolicyInput { 2619 s.ContainerName = &v 2620 return s 2621 } 2622 2623 type DeleteContainerPolicyOutput struct { 2624 _ struct{} `type:"structure"` 2625 } 2626 2627 // String returns the string representation. 2628 // 2629 // API parameter values that are decorated as "sensitive" in the API will not 2630 // be included in the string output. The member name will be present, but the 2631 // value will be replaced with "sensitive". 2632 func (s DeleteContainerPolicyOutput) String() string { 2633 return awsutil.Prettify(s) 2634 } 2635 2636 // GoString returns the string representation. 2637 // 2638 // API parameter values that are decorated as "sensitive" in the API will not 2639 // be included in the string output. The member name will be present, but the 2640 // value will be replaced with "sensitive". 2641 func (s DeleteContainerPolicyOutput) GoString() string { 2642 return s.String() 2643 } 2644 2645 type DeleteCorsPolicyInput struct { 2646 _ struct{} `type:"structure"` 2647 2648 // The name of the container to remove the policy from. 2649 // 2650 // ContainerName is a required field 2651 ContainerName *string `min:"1" type:"string" required:"true"` 2652 } 2653 2654 // String returns the string representation. 2655 // 2656 // API parameter values that are decorated as "sensitive" in the API will not 2657 // be included in the string output. The member name will be present, but the 2658 // value will be replaced with "sensitive". 2659 func (s DeleteCorsPolicyInput) String() string { 2660 return awsutil.Prettify(s) 2661 } 2662 2663 // GoString returns the string representation. 2664 // 2665 // API parameter values that are decorated as "sensitive" in the API will not 2666 // be included in the string output. The member name will be present, but the 2667 // value will be replaced with "sensitive". 2668 func (s DeleteCorsPolicyInput) GoString() string { 2669 return s.String() 2670 } 2671 2672 // Validate inspects the fields of the type to determine if they are valid. 2673 func (s *DeleteCorsPolicyInput) Validate() error { 2674 invalidParams := request.ErrInvalidParams{Context: "DeleteCorsPolicyInput"} 2675 if s.ContainerName == nil { 2676 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2677 } 2678 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2679 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2680 } 2681 2682 if invalidParams.Len() > 0 { 2683 return invalidParams 2684 } 2685 return nil 2686 } 2687 2688 // SetContainerName sets the ContainerName field's value. 2689 func (s *DeleteCorsPolicyInput) SetContainerName(v string) *DeleteCorsPolicyInput { 2690 s.ContainerName = &v 2691 return s 2692 } 2693 2694 type DeleteCorsPolicyOutput struct { 2695 _ struct{} `type:"structure"` 2696 } 2697 2698 // String returns the string representation. 2699 // 2700 // API parameter values that are decorated as "sensitive" in the API will not 2701 // be included in the string output. The member name will be present, but the 2702 // value will be replaced with "sensitive". 2703 func (s DeleteCorsPolicyOutput) String() string { 2704 return awsutil.Prettify(s) 2705 } 2706 2707 // GoString returns the string representation. 2708 // 2709 // API parameter values that are decorated as "sensitive" in the API will not 2710 // be included in the string output. The member name will be present, but the 2711 // value will be replaced with "sensitive". 2712 func (s DeleteCorsPolicyOutput) GoString() string { 2713 return s.String() 2714 } 2715 2716 type DeleteLifecyclePolicyInput struct { 2717 _ struct{} `type:"structure"` 2718 2719 // The name of the container that holds the object lifecycle policy. 2720 // 2721 // ContainerName is a required field 2722 ContainerName *string `min:"1" type:"string" required:"true"` 2723 } 2724 2725 // String returns the string representation. 2726 // 2727 // API parameter values that are decorated as "sensitive" in the API will not 2728 // be included in the string output. The member name will be present, but the 2729 // value will be replaced with "sensitive". 2730 func (s DeleteLifecyclePolicyInput) String() string { 2731 return awsutil.Prettify(s) 2732 } 2733 2734 // GoString returns the string representation. 2735 // 2736 // API parameter values that are decorated as "sensitive" in the API will not 2737 // be included in the string output. The member name will be present, but the 2738 // value will be replaced with "sensitive". 2739 func (s DeleteLifecyclePolicyInput) GoString() string { 2740 return s.String() 2741 } 2742 2743 // Validate inspects the fields of the type to determine if they are valid. 2744 func (s *DeleteLifecyclePolicyInput) Validate() error { 2745 invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"} 2746 if s.ContainerName == nil { 2747 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2748 } 2749 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2750 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2751 } 2752 2753 if invalidParams.Len() > 0 { 2754 return invalidParams 2755 } 2756 return nil 2757 } 2758 2759 // SetContainerName sets the ContainerName field's value. 2760 func (s *DeleteLifecyclePolicyInput) SetContainerName(v string) *DeleteLifecyclePolicyInput { 2761 s.ContainerName = &v 2762 return s 2763 } 2764 2765 type DeleteLifecyclePolicyOutput struct { 2766 _ struct{} `type:"structure"` 2767 } 2768 2769 // String returns the string representation. 2770 // 2771 // API parameter values that are decorated as "sensitive" in the API will not 2772 // be included in the string output. The member name will be present, but the 2773 // value will be replaced with "sensitive". 2774 func (s DeleteLifecyclePolicyOutput) String() string { 2775 return awsutil.Prettify(s) 2776 } 2777 2778 // GoString returns the string representation. 2779 // 2780 // API parameter values that are decorated as "sensitive" in the API will not 2781 // be included in the string output. The member name will be present, but the 2782 // value will be replaced with "sensitive". 2783 func (s DeleteLifecyclePolicyOutput) GoString() string { 2784 return s.String() 2785 } 2786 2787 type DeleteMetricPolicyInput struct { 2788 _ struct{} `type:"structure"` 2789 2790 // The name of the container that is associated with the metric policy that 2791 // you want to delete. 2792 // 2793 // ContainerName is a required field 2794 ContainerName *string `min:"1" type:"string" required:"true"` 2795 } 2796 2797 // String returns the string representation. 2798 // 2799 // API parameter values that are decorated as "sensitive" in the API will not 2800 // be included in the string output. The member name will be present, but the 2801 // value will be replaced with "sensitive". 2802 func (s DeleteMetricPolicyInput) String() string { 2803 return awsutil.Prettify(s) 2804 } 2805 2806 // GoString returns the string representation. 2807 // 2808 // API parameter values that are decorated as "sensitive" in the API will not 2809 // be included in the string output. The member name will be present, but the 2810 // value will be replaced with "sensitive". 2811 func (s DeleteMetricPolicyInput) GoString() string { 2812 return s.String() 2813 } 2814 2815 // Validate inspects the fields of the type to determine if they are valid. 2816 func (s *DeleteMetricPolicyInput) Validate() error { 2817 invalidParams := request.ErrInvalidParams{Context: "DeleteMetricPolicyInput"} 2818 if s.ContainerName == nil { 2819 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2820 } 2821 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2822 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2823 } 2824 2825 if invalidParams.Len() > 0 { 2826 return invalidParams 2827 } 2828 return nil 2829 } 2830 2831 // SetContainerName sets the ContainerName field's value. 2832 func (s *DeleteMetricPolicyInput) SetContainerName(v string) *DeleteMetricPolicyInput { 2833 s.ContainerName = &v 2834 return s 2835 } 2836 2837 type DeleteMetricPolicyOutput struct { 2838 _ struct{} `type:"structure"` 2839 } 2840 2841 // String returns the string representation. 2842 // 2843 // API parameter values that are decorated as "sensitive" in the API will not 2844 // be included in the string output. The member name will be present, but the 2845 // value will be replaced with "sensitive". 2846 func (s DeleteMetricPolicyOutput) String() string { 2847 return awsutil.Prettify(s) 2848 } 2849 2850 // GoString returns the string representation. 2851 // 2852 // API parameter values that are decorated as "sensitive" in the API will not 2853 // be included in the string output. The member name will be present, but the 2854 // value will be replaced with "sensitive". 2855 func (s DeleteMetricPolicyOutput) GoString() string { 2856 return s.String() 2857 } 2858 2859 type DescribeContainerInput struct { 2860 _ struct{} `type:"structure"` 2861 2862 // The name of the container to query. 2863 ContainerName *string `min:"1" type:"string"` 2864 } 2865 2866 // String returns the string representation. 2867 // 2868 // API parameter values that are decorated as "sensitive" in the API will not 2869 // be included in the string output. The member name will be present, but the 2870 // value will be replaced with "sensitive". 2871 func (s DescribeContainerInput) String() string { 2872 return awsutil.Prettify(s) 2873 } 2874 2875 // GoString returns the string representation. 2876 // 2877 // API parameter values that are decorated as "sensitive" in the API will not 2878 // be included in the string output. The member name will be present, but the 2879 // value will be replaced with "sensitive". 2880 func (s DescribeContainerInput) GoString() string { 2881 return s.String() 2882 } 2883 2884 // Validate inspects the fields of the type to determine if they are valid. 2885 func (s *DescribeContainerInput) Validate() error { 2886 invalidParams := request.ErrInvalidParams{Context: "DescribeContainerInput"} 2887 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2888 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2889 } 2890 2891 if invalidParams.Len() > 0 { 2892 return invalidParams 2893 } 2894 return nil 2895 } 2896 2897 // SetContainerName sets the ContainerName field's value. 2898 func (s *DescribeContainerInput) SetContainerName(v string) *DescribeContainerInput { 2899 s.ContainerName = &v 2900 return s 2901 } 2902 2903 type DescribeContainerOutput struct { 2904 _ struct{} `type:"structure"` 2905 2906 // The name of the queried container. 2907 Container *Container `type:"structure"` 2908 } 2909 2910 // String returns the string representation. 2911 // 2912 // API parameter values that are decorated as "sensitive" in the API will not 2913 // be included in the string output. The member name will be present, but the 2914 // value will be replaced with "sensitive". 2915 func (s DescribeContainerOutput) String() string { 2916 return awsutil.Prettify(s) 2917 } 2918 2919 // GoString returns the string representation. 2920 // 2921 // API parameter values that are decorated as "sensitive" in the API will not 2922 // be included in the string output. The member name will be present, but the 2923 // value will be replaced with "sensitive". 2924 func (s DescribeContainerOutput) GoString() string { 2925 return s.String() 2926 } 2927 2928 // SetContainer sets the Container field's value. 2929 func (s *DescribeContainerOutput) SetContainer(v *Container) *DescribeContainerOutput { 2930 s.Container = v 2931 return s 2932 } 2933 2934 type GetContainerPolicyInput struct { 2935 _ struct{} `type:"structure"` 2936 2937 // The name of the container. 2938 // 2939 // ContainerName is a required field 2940 ContainerName *string `min:"1" type:"string" required:"true"` 2941 } 2942 2943 // String returns the string representation. 2944 // 2945 // API parameter values that are decorated as "sensitive" in the API will not 2946 // be included in the string output. The member name will be present, but the 2947 // value will be replaced with "sensitive". 2948 func (s GetContainerPolicyInput) String() string { 2949 return awsutil.Prettify(s) 2950 } 2951 2952 // GoString returns the string representation. 2953 // 2954 // API parameter values that are decorated as "sensitive" in the API will not 2955 // be included in the string output. The member name will be present, but the 2956 // value will be replaced with "sensitive". 2957 func (s GetContainerPolicyInput) GoString() string { 2958 return s.String() 2959 } 2960 2961 // Validate inspects the fields of the type to determine if they are valid. 2962 func (s *GetContainerPolicyInput) Validate() error { 2963 invalidParams := request.ErrInvalidParams{Context: "GetContainerPolicyInput"} 2964 if s.ContainerName == nil { 2965 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 2966 } 2967 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 2968 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 2969 } 2970 2971 if invalidParams.Len() > 0 { 2972 return invalidParams 2973 } 2974 return nil 2975 } 2976 2977 // SetContainerName sets the ContainerName field's value. 2978 func (s *GetContainerPolicyInput) SetContainerName(v string) *GetContainerPolicyInput { 2979 s.ContainerName = &v 2980 return s 2981 } 2982 2983 type GetContainerPolicyOutput struct { 2984 _ struct{} `type:"structure"` 2985 2986 // The contents of the access policy. 2987 // 2988 // Policy is a required field 2989 Policy *string `min:"1" type:"string" required:"true"` 2990 } 2991 2992 // String returns the string representation. 2993 // 2994 // API parameter values that are decorated as "sensitive" in the API will not 2995 // be included in the string output. The member name will be present, but the 2996 // value will be replaced with "sensitive". 2997 func (s GetContainerPolicyOutput) String() string { 2998 return awsutil.Prettify(s) 2999 } 3000 3001 // GoString returns the string representation. 3002 // 3003 // API parameter values that are decorated as "sensitive" in the API will not 3004 // be included in the string output. The member name will be present, but the 3005 // value will be replaced with "sensitive". 3006 func (s GetContainerPolicyOutput) GoString() string { 3007 return s.String() 3008 } 3009 3010 // SetPolicy sets the Policy field's value. 3011 func (s *GetContainerPolicyOutput) SetPolicy(v string) *GetContainerPolicyOutput { 3012 s.Policy = &v 3013 return s 3014 } 3015 3016 type GetCorsPolicyInput struct { 3017 _ struct{} `type:"structure"` 3018 3019 // The name of the container that the policy is assigned to. 3020 // 3021 // ContainerName is a required field 3022 ContainerName *string `min:"1" type:"string" required:"true"` 3023 } 3024 3025 // String returns the string representation. 3026 // 3027 // API parameter values that are decorated as "sensitive" in the API will not 3028 // be included in the string output. The member name will be present, but the 3029 // value will be replaced with "sensitive". 3030 func (s GetCorsPolicyInput) String() string { 3031 return awsutil.Prettify(s) 3032 } 3033 3034 // GoString returns the string representation. 3035 // 3036 // API parameter values that are decorated as "sensitive" in the API will not 3037 // be included in the string output. The member name will be present, but the 3038 // value will be replaced with "sensitive". 3039 func (s GetCorsPolicyInput) GoString() string { 3040 return s.String() 3041 } 3042 3043 // Validate inspects the fields of the type to determine if they are valid. 3044 func (s *GetCorsPolicyInput) Validate() error { 3045 invalidParams := request.ErrInvalidParams{Context: "GetCorsPolicyInput"} 3046 if s.ContainerName == nil { 3047 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 3048 } 3049 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 3050 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 3051 } 3052 3053 if invalidParams.Len() > 0 { 3054 return invalidParams 3055 } 3056 return nil 3057 } 3058 3059 // SetContainerName sets the ContainerName field's value. 3060 func (s *GetCorsPolicyInput) SetContainerName(v string) *GetCorsPolicyInput { 3061 s.ContainerName = &v 3062 return s 3063 } 3064 3065 type GetCorsPolicyOutput struct { 3066 _ struct{} `type:"structure"` 3067 3068 // The CORS policy assigned to the container. 3069 // 3070 // CorsPolicy is a required field 3071 CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"` 3072 } 3073 3074 // String returns the string representation. 3075 // 3076 // API parameter values that are decorated as "sensitive" in the API will not 3077 // be included in the string output. The member name will be present, but the 3078 // value will be replaced with "sensitive". 3079 func (s GetCorsPolicyOutput) String() string { 3080 return awsutil.Prettify(s) 3081 } 3082 3083 // GoString returns the string representation. 3084 // 3085 // API parameter values that are decorated as "sensitive" in the API will not 3086 // be included in the string output. The member name will be present, but the 3087 // value will be replaced with "sensitive". 3088 func (s GetCorsPolicyOutput) GoString() string { 3089 return s.String() 3090 } 3091 3092 // SetCorsPolicy sets the CorsPolicy field's value. 3093 func (s *GetCorsPolicyOutput) SetCorsPolicy(v []*CorsRule) *GetCorsPolicyOutput { 3094 s.CorsPolicy = v 3095 return s 3096 } 3097 3098 type GetLifecyclePolicyInput struct { 3099 _ struct{} `type:"structure"` 3100 3101 // The name of the container that the object lifecycle policy is assigned to. 3102 // 3103 // ContainerName is a required field 3104 ContainerName *string `min:"1" type:"string" required:"true"` 3105 } 3106 3107 // String returns the string representation. 3108 // 3109 // API parameter values that are decorated as "sensitive" in the API will not 3110 // be included in the string output. The member name will be present, but the 3111 // value will be replaced with "sensitive". 3112 func (s GetLifecyclePolicyInput) String() string { 3113 return awsutil.Prettify(s) 3114 } 3115 3116 // GoString returns the string representation. 3117 // 3118 // API parameter values that are decorated as "sensitive" in the API will not 3119 // be included in the string output. The member name will be present, but the 3120 // value will be replaced with "sensitive". 3121 func (s GetLifecyclePolicyInput) GoString() string { 3122 return s.String() 3123 } 3124 3125 // Validate inspects the fields of the type to determine if they are valid. 3126 func (s *GetLifecyclePolicyInput) Validate() error { 3127 invalidParams := request.ErrInvalidParams{Context: "GetLifecyclePolicyInput"} 3128 if s.ContainerName == nil { 3129 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 3130 } 3131 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 3132 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 3133 } 3134 3135 if invalidParams.Len() > 0 { 3136 return invalidParams 3137 } 3138 return nil 3139 } 3140 3141 // SetContainerName sets the ContainerName field's value. 3142 func (s *GetLifecyclePolicyInput) SetContainerName(v string) *GetLifecyclePolicyInput { 3143 s.ContainerName = &v 3144 return s 3145 } 3146 3147 type GetLifecyclePolicyOutput struct { 3148 _ struct{} `type:"structure"` 3149 3150 // The object lifecycle policy that is assigned to the container. 3151 // 3152 // LifecyclePolicy is a required field 3153 LifecyclePolicy *string `type:"string" required:"true"` 3154 } 3155 3156 // String returns the string representation. 3157 // 3158 // API parameter values that are decorated as "sensitive" in the API will not 3159 // be included in the string output. The member name will be present, but the 3160 // value will be replaced with "sensitive". 3161 func (s GetLifecyclePolicyOutput) String() string { 3162 return awsutil.Prettify(s) 3163 } 3164 3165 // GoString returns the string representation. 3166 // 3167 // API parameter values that are decorated as "sensitive" in the API will not 3168 // be included in the string output. The member name will be present, but the 3169 // value will be replaced with "sensitive". 3170 func (s GetLifecyclePolicyOutput) GoString() string { 3171 return s.String() 3172 } 3173 3174 // SetLifecyclePolicy sets the LifecyclePolicy field's value. 3175 func (s *GetLifecyclePolicyOutput) SetLifecyclePolicy(v string) *GetLifecyclePolicyOutput { 3176 s.LifecyclePolicy = &v 3177 return s 3178 } 3179 3180 type GetMetricPolicyInput struct { 3181 _ struct{} `type:"structure"` 3182 3183 // The name of the container that is associated with the metric policy. 3184 // 3185 // ContainerName is a required field 3186 ContainerName *string `min:"1" type:"string" required:"true"` 3187 } 3188 3189 // String returns the string representation. 3190 // 3191 // API parameter values that are decorated as "sensitive" in the API will not 3192 // be included in the string output. The member name will be present, but the 3193 // value will be replaced with "sensitive". 3194 func (s GetMetricPolicyInput) String() string { 3195 return awsutil.Prettify(s) 3196 } 3197 3198 // GoString returns the string representation. 3199 // 3200 // API parameter values that are decorated as "sensitive" in the API will not 3201 // be included in the string output. The member name will be present, but the 3202 // value will be replaced with "sensitive". 3203 func (s GetMetricPolicyInput) GoString() string { 3204 return s.String() 3205 } 3206 3207 // Validate inspects the fields of the type to determine if they are valid. 3208 func (s *GetMetricPolicyInput) Validate() error { 3209 invalidParams := request.ErrInvalidParams{Context: "GetMetricPolicyInput"} 3210 if s.ContainerName == nil { 3211 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 3212 } 3213 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 3214 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 3215 } 3216 3217 if invalidParams.Len() > 0 { 3218 return invalidParams 3219 } 3220 return nil 3221 } 3222 3223 // SetContainerName sets the ContainerName field's value. 3224 func (s *GetMetricPolicyInput) SetContainerName(v string) *GetMetricPolicyInput { 3225 s.ContainerName = &v 3226 return s 3227 } 3228 3229 type GetMetricPolicyOutput struct { 3230 _ struct{} `type:"structure"` 3231 3232 // The metric policy that is associated with the specific container. 3233 // 3234 // MetricPolicy is a required field 3235 MetricPolicy *MetricPolicy `type:"structure" required:"true"` 3236 } 3237 3238 // String returns the string representation. 3239 // 3240 // API parameter values that are decorated as "sensitive" in the API will not 3241 // be included in the string output. The member name will be present, but the 3242 // value will be replaced with "sensitive". 3243 func (s GetMetricPolicyOutput) String() string { 3244 return awsutil.Prettify(s) 3245 } 3246 3247 // GoString returns the string representation. 3248 // 3249 // API parameter values that are decorated as "sensitive" in the API will not 3250 // be included in the string output. The member name will be present, but the 3251 // value will be replaced with "sensitive". 3252 func (s GetMetricPolicyOutput) GoString() string { 3253 return s.String() 3254 } 3255 3256 // SetMetricPolicy sets the MetricPolicy field's value. 3257 func (s *GetMetricPolicyOutput) SetMetricPolicy(v *MetricPolicy) *GetMetricPolicyOutput { 3258 s.MetricPolicy = v 3259 return s 3260 } 3261 3262 // The service is temporarily unavailable. 3263 type InternalServerError struct { 3264 _ struct{} `type:"structure"` 3265 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3266 3267 Message_ *string `locationName:"Message" min:"1" type:"string"` 3268 } 3269 3270 // String returns the string representation. 3271 // 3272 // API parameter values that are decorated as "sensitive" in the API will not 3273 // be included in the string output. The member name will be present, but the 3274 // value will be replaced with "sensitive". 3275 func (s InternalServerError) String() string { 3276 return awsutil.Prettify(s) 3277 } 3278 3279 // GoString returns the string representation. 3280 // 3281 // API parameter values that are decorated as "sensitive" in the API will not 3282 // be included in the string output. The member name will be present, but the 3283 // value will be replaced with "sensitive". 3284 func (s InternalServerError) GoString() string { 3285 return s.String() 3286 } 3287 3288 func newErrorInternalServerError(v protocol.ResponseMetadata) error { 3289 return &InternalServerError{ 3290 RespMetadata: v, 3291 } 3292 } 3293 3294 // Code returns the exception type name. 3295 func (s *InternalServerError) Code() string { 3296 return "InternalServerError" 3297 } 3298 3299 // Message returns the exception's message. 3300 func (s *InternalServerError) Message() string { 3301 if s.Message_ != nil { 3302 return *s.Message_ 3303 } 3304 return "" 3305 } 3306 3307 // OrigErr always returns nil, satisfies awserr.Error interface. 3308 func (s *InternalServerError) OrigErr() error { 3309 return nil 3310 } 3311 3312 func (s *InternalServerError) Error() string { 3313 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3314 } 3315 3316 // Status code returns the HTTP status code for the request's response error. 3317 func (s *InternalServerError) StatusCode() int { 3318 return s.RespMetadata.StatusCode 3319 } 3320 3321 // RequestID returns the service's response RequestID for request. 3322 func (s *InternalServerError) RequestID() string { 3323 return s.RespMetadata.RequestID 3324 } 3325 3326 // A service limit has been exceeded. 3327 type LimitExceededException struct { 3328 _ struct{} `type:"structure"` 3329 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3330 3331 Message_ *string `locationName:"Message" min:"1" type:"string"` 3332 } 3333 3334 // String returns the string representation. 3335 // 3336 // API parameter values that are decorated as "sensitive" in the API will not 3337 // be included in the string output. The member name will be present, but the 3338 // value will be replaced with "sensitive". 3339 func (s LimitExceededException) String() string { 3340 return awsutil.Prettify(s) 3341 } 3342 3343 // GoString returns the string representation. 3344 // 3345 // API parameter values that are decorated as "sensitive" in the API will not 3346 // be included in the string output. The member name will be present, but the 3347 // value will be replaced with "sensitive". 3348 func (s LimitExceededException) GoString() string { 3349 return s.String() 3350 } 3351 3352 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3353 return &LimitExceededException{ 3354 RespMetadata: v, 3355 } 3356 } 3357 3358 // Code returns the exception type name. 3359 func (s *LimitExceededException) Code() string { 3360 return "LimitExceededException" 3361 } 3362 3363 // Message returns the exception's message. 3364 func (s *LimitExceededException) Message() string { 3365 if s.Message_ != nil { 3366 return *s.Message_ 3367 } 3368 return "" 3369 } 3370 3371 // OrigErr always returns nil, satisfies awserr.Error interface. 3372 func (s *LimitExceededException) OrigErr() error { 3373 return nil 3374 } 3375 3376 func (s *LimitExceededException) Error() string { 3377 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3378 } 3379 3380 // Status code returns the HTTP status code for the request's response error. 3381 func (s *LimitExceededException) StatusCode() int { 3382 return s.RespMetadata.StatusCode 3383 } 3384 3385 // RequestID returns the service's response RequestID for request. 3386 func (s *LimitExceededException) RequestID() string { 3387 return s.RespMetadata.RequestID 3388 } 3389 3390 type ListContainersInput struct { 3391 _ struct{} `type:"structure"` 3392 3393 // Enter the maximum number of containers in the response. Use from 1 to 255 3394 // characters. 3395 MaxResults *int64 `min:"1" type:"integer"` 3396 3397 // Only if you used MaxResults in the first command, enter the token (which 3398 // was included in the previous response) to obtain the next set of containers. 3399 // This token is included in a response only if there actually are more containers 3400 // to list. 3401 NextToken *string `min:"1" type:"string"` 3402 } 3403 3404 // String returns the string representation. 3405 // 3406 // API parameter values that are decorated as "sensitive" in the API will not 3407 // be included in the string output. The member name will be present, but the 3408 // value will be replaced with "sensitive". 3409 func (s ListContainersInput) String() string { 3410 return awsutil.Prettify(s) 3411 } 3412 3413 // GoString returns the string representation. 3414 // 3415 // API parameter values that are decorated as "sensitive" in the API will not 3416 // be included in the string output. The member name will be present, but the 3417 // value will be replaced with "sensitive". 3418 func (s ListContainersInput) GoString() string { 3419 return s.String() 3420 } 3421 3422 // Validate inspects the fields of the type to determine if they are valid. 3423 func (s *ListContainersInput) Validate() error { 3424 invalidParams := request.ErrInvalidParams{Context: "ListContainersInput"} 3425 if s.MaxResults != nil && *s.MaxResults < 1 { 3426 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3427 } 3428 if s.NextToken != nil && len(*s.NextToken) < 1 { 3429 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3430 } 3431 3432 if invalidParams.Len() > 0 { 3433 return invalidParams 3434 } 3435 return nil 3436 } 3437 3438 // SetMaxResults sets the MaxResults field's value. 3439 func (s *ListContainersInput) SetMaxResults(v int64) *ListContainersInput { 3440 s.MaxResults = &v 3441 return s 3442 } 3443 3444 // SetNextToken sets the NextToken field's value. 3445 func (s *ListContainersInput) SetNextToken(v string) *ListContainersInput { 3446 s.NextToken = &v 3447 return s 3448 } 3449 3450 type ListContainersOutput struct { 3451 _ struct{} `type:"structure"` 3452 3453 // The names of the containers. 3454 // 3455 // Containers is a required field 3456 Containers []*Container `type:"list" required:"true"` 3457 3458 // NextToken is the token to use in the next call to ListContainers. This token 3459 // is returned only if you included the MaxResults tag in the original command, 3460 // and only if there are still containers to return. 3461 NextToken *string `min:"1" type:"string"` 3462 } 3463 3464 // String returns the string representation. 3465 // 3466 // API parameter values that are decorated as "sensitive" in the API will not 3467 // be included in the string output. The member name will be present, but the 3468 // value will be replaced with "sensitive". 3469 func (s ListContainersOutput) String() string { 3470 return awsutil.Prettify(s) 3471 } 3472 3473 // GoString returns the string representation. 3474 // 3475 // API parameter values that are decorated as "sensitive" in the API will not 3476 // be included in the string output. The member name will be present, but the 3477 // value will be replaced with "sensitive". 3478 func (s ListContainersOutput) GoString() string { 3479 return s.String() 3480 } 3481 3482 // SetContainers sets the Containers field's value. 3483 func (s *ListContainersOutput) SetContainers(v []*Container) *ListContainersOutput { 3484 s.Containers = v 3485 return s 3486 } 3487 3488 // SetNextToken sets the NextToken field's value. 3489 func (s *ListContainersOutput) SetNextToken(v string) *ListContainersOutput { 3490 s.NextToken = &v 3491 return s 3492 } 3493 3494 type ListTagsForResourceInput struct { 3495 _ struct{} `type:"structure"` 3496 3497 // The Amazon Resource Name (ARN) for the container. 3498 // 3499 // Resource is a required field 3500 Resource *string `min:"1" type:"string" required:"true"` 3501 } 3502 3503 // String returns the string representation. 3504 // 3505 // API parameter values that are decorated as "sensitive" in the API will not 3506 // be included in the string output. The member name will be present, but the 3507 // value will be replaced with "sensitive". 3508 func (s ListTagsForResourceInput) String() string { 3509 return awsutil.Prettify(s) 3510 } 3511 3512 // GoString returns the string representation. 3513 // 3514 // API parameter values that are decorated as "sensitive" in the API will not 3515 // be included in the string output. The member name will be present, but the 3516 // value will be replaced with "sensitive". 3517 func (s ListTagsForResourceInput) GoString() string { 3518 return s.String() 3519 } 3520 3521 // Validate inspects the fields of the type to determine if they are valid. 3522 func (s *ListTagsForResourceInput) Validate() error { 3523 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3524 if s.Resource == nil { 3525 invalidParams.Add(request.NewErrParamRequired("Resource")) 3526 } 3527 if s.Resource != nil && len(*s.Resource) < 1 { 3528 invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) 3529 } 3530 3531 if invalidParams.Len() > 0 { 3532 return invalidParams 3533 } 3534 return nil 3535 } 3536 3537 // SetResource sets the Resource field's value. 3538 func (s *ListTagsForResourceInput) SetResource(v string) *ListTagsForResourceInput { 3539 s.Resource = &v 3540 return s 3541 } 3542 3543 type ListTagsForResourceOutput struct { 3544 _ struct{} `type:"structure"` 3545 3546 // An array of key:value pairs that are assigned to the container. 3547 Tags []*Tag `min:"1" type:"list"` 3548 } 3549 3550 // String returns the string representation. 3551 // 3552 // API parameter values that are decorated as "sensitive" in the API will not 3553 // be included in the string output. The member name will be present, but the 3554 // value will be replaced with "sensitive". 3555 func (s ListTagsForResourceOutput) String() string { 3556 return awsutil.Prettify(s) 3557 } 3558 3559 // GoString returns the string representation. 3560 // 3561 // API parameter values that are decorated as "sensitive" in the API will not 3562 // be included in the string output. The member name will be present, but the 3563 // value will be replaced with "sensitive". 3564 func (s ListTagsForResourceOutput) GoString() string { 3565 return s.String() 3566 } 3567 3568 // SetTags sets the Tags field's value. 3569 func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { 3570 s.Tags = v 3571 return s 3572 } 3573 3574 // The metric policy that is associated with the container. A metric policy 3575 // allows AWS Elemental MediaStore to send metrics to Amazon CloudWatch. In 3576 // the policy, you must indicate whether you want MediaStore to send container-level 3577 // metrics. You can also include rules to define groups of objects that you 3578 // want MediaStore to send object-level metrics for. 3579 // 3580 // To view examples of how to construct a metric policy for your use case, see 3581 // Example Metric Policies (https://docs.aws.amazon.com/mediastore/latest/ug/policies-metric-examples.html). 3582 type MetricPolicy struct { 3583 _ struct{} `type:"structure"` 3584 3585 // A setting to enable or disable metrics at the container level. 3586 // 3587 // ContainerLevelMetrics is a required field 3588 ContainerLevelMetrics *string `type:"string" required:"true" enum:"ContainerLevelMetrics"` 3589 3590 // A parameter that holds an array of rules that enable metrics at the object 3591 // level. This parameter is optional, but if you choose to include it, you must 3592 // also include at least one rule. By default, you can include up to five rules. 3593 // You can also request a quota increase (https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) 3594 // to allow up to 300 rules per policy. 3595 MetricPolicyRules []*MetricPolicyRule `min:"1" type:"list"` 3596 } 3597 3598 // String returns the string representation. 3599 // 3600 // API parameter values that are decorated as "sensitive" in the API will not 3601 // be included in the string output. The member name will be present, but the 3602 // value will be replaced with "sensitive". 3603 func (s MetricPolicy) String() string { 3604 return awsutil.Prettify(s) 3605 } 3606 3607 // GoString returns the string representation. 3608 // 3609 // API parameter values that are decorated as "sensitive" in the API will not 3610 // be included in the string output. The member name will be present, but the 3611 // value will be replaced with "sensitive". 3612 func (s MetricPolicy) GoString() string { 3613 return s.String() 3614 } 3615 3616 // Validate inspects the fields of the type to determine if they are valid. 3617 func (s *MetricPolicy) Validate() error { 3618 invalidParams := request.ErrInvalidParams{Context: "MetricPolicy"} 3619 if s.ContainerLevelMetrics == nil { 3620 invalidParams.Add(request.NewErrParamRequired("ContainerLevelMetrics")) 3621 } 3622 if s.MetricPolicyRules != nil && len(s.MetricPolicyRules) < 1 { 3623 invalidParams.Add(request.NewErrParamMinLen("MetricPolicyRules", 1)) 3624 } 3625 if s.MetricPolicyRules != nil { 3626 for i, v := range s.MetricPolicyRules { 3627 if v == nil { 3628 continue 3629 } 3630 if err := v.Validate(); err != nil { 3631 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "MetricPolicyRules", i), err.(request.ErrInvalidParams)) 3632 } 3633 } 3634 } 3635 3636 if invalidParams.Len() > 0 { 3637 return invalidParams 3638 } 3639 return nil 3640 } 3641 3642 // SetContainerLevelMetrics sets the ContainerLevelMetrics field's value. 3643 func (s *MetricPolicy) SetContainerLevelMetrics(v string) *MetricPolicy { 3644 s.ContainerLevelMetrics = &v 3645 return s 3646 } 3647 3648 // SetMetricPolicyRules sets the MetricPolicyRules field's value. 3649 func (s *MetricPolicy) SetMetricPolicyRules(v []*MetricPolicyRule) *MetricPolicy { 3650 s.MetricPolicyRules = v 3651 return s 3652 } 3653 3654 // A setting that enables metrics at the object level. Each rule contains an 3655 // object group and an object group name. If the policy includes the MetricPolicyRules 3656 // parameter, you must include at least one rule. Each metric policy can include 3657 // up to five rules by default. You can also request a quota increase (https://console.aws.amazon.com/servicequotas/home?region=us-east-1#!/services/mediastore/quotas) 3658 // to allow up to 300 rules per policy. 3659 type MetricPolicyRule struct { 3660 _ struct{} `type:"structure"` 3661 3662 // A path or file name that defines which objects to include in the group. Wildcards 3663 // (*) are acceptable. 3664 // 3665 // ObjectGroup is a required field 3666 ObjectGroup *string `min:"1" type:"string" required:"true"` 3667 3668 // A name that allows you to refer to the object group. 3669 // 3670 // ObjectGroupName is a required field 3671 ObjectGroupName *string `min:"1" type:"string" required:"true"` 3672 } 3673 3674 // String returns the string representation. 3675 // 3676 // API parameter values that are decorated as "sensitive" in the API will not 3677 // be included in the string output. The member name will be present, but the 3678 // value will be replaced with "sensitive". 3679 func (s MetricPolicyRule) String() string { 3680 return awsutil.Prettify(s) 3681 } 3682 3683 // GoString returns the string representation. 3684 // 3685 // API parameter values that are decorated as "sensitive" in the API will not 3686 // be included in the string output. The member name will be present, but the 3687 // value will be replaced with "sensitive". 3688 func (s MetricPolicyRule) GoString() string { 3689 return s.String() 3690 } 3691 3692 // Validate inspects the fields of the type to determine if they are valid. 3693 func (s *MetricPolicyRule) Validate() error { 3694 invalidParams := request.ErrInvalidParams{Context: "MetricPolicyRule"} 3695 if s.ObjectGroup == nil { 3696 invalidParams.Add(request.NewErrParamRequired("ObjectGroup")) 3697 } 3698 if s.ObjectGroup != nil && len(*s.ObjectGroup) < 1 { 3699 invalidParams.Add(request.NewErrParamMinLen("ObjectGroup", 1)) 3700 } 3701 if s.ObjectGroupName == nil { 3702 invalidParams.Add(request.NewErrParamRequired("ObjectGroupName")) 3703 } 3704 if s.ObjectGroupName != nil && len(*s.ObjectGroupName) < 1 { 3705 invalidParams.Add(request.NewErrParamMinLen("ObjectGroupName", 1)) 3706 } 3707 3708 if invalidParams.Len() > 0 { 3709 return invalidParams 3710 } 3711 return nil 3712 } 3713 3714 // SetObjectGroup sets the ObjectGroup field's value. 3715 func (s *MetricPolicyRule) SetObjectGroup(v string) *MetricPolicyRule { 3716 s.ObjectGroup = &v 3717 return s 3718 } 3719 3720 // SetObjectGroupName sets the ObjectGroupName field's value. 3721 func (s *MetricPolicyRule) SetObjectGroupName(v string) *MetricPolicyRule { 3722 s.ObjectGroupName = &v 3723 return s 3724 } 3725 3726 // The policy that you specified in the request does not exist. 3727 type PolicyNotFoundException struct { 3728 _ struct{} `type:"structure"` 3729 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3730 3731 Message_ *string `locationName:"Message" min:"1" type:"string"` 3732 } 3733 3734 // String returns the string representation. 3735 // 3736 // API parameter values that are decorated as "sensitive" in the API will not 3737 // be included in the string output. The member name will be present, but the 3738 // value will be replaced with "sensitive". 3739 func (s PolicyNotFoundException) String() string { 3740 return awsutil.Prettify(s) 3741 } 3742 3743 // GoString returns the string representation. 3744 // 3745 // API parameter values that are decorated as "sensitive" in the API will not 3746 // be included in the string output. The member name will be present, but the 3747 // value will be replaced with "sensitive". 3748 func (s PolicyNotFoundException) GoString() string { 3749 return s.String() 3750 } 3751 3752 func newErrorPolicyNotFoundException(v protocol.ResponseMetadata) error { 3753 return &PolicyNotFoundException{ 3754 RespMetadata: v, 3755 } 3756 } 3757 3758 // Code returns the exception type name. 3759 func (s *PolicyNotFoundException) Code() string { 3760 return "PolicyNotFoundException" 3761 } 3762 3763 // Message returns the exception's message. 3764 func (s *PolicyNotFoundException) Message() string { 3765 if s.Message_ != nil { 3766 return *s.Message_ 3767 } 3768 return "" 3769 } 3770 3771 // OrigErr always returns nil, satisfies awserr.Error interface. 3772 func (s *PolicyNotFoundException) OrigErr() error { 3773 return nil 3774 } 3775 3776 func (s *PolicyNotFoundException) Error() string { 3777 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3778 } 3779 3780 // Status code returns the HTTP status code for the request's response error. 3781 func (s *PolicyNotFoundException) StatusCode() int { 3782 return s.RespMetadata.StatusCode 3783 } 3784 3785 // RequestID returns the service's response RequestID for request. 3786 func (s *PolicyNotFoundException) RequestID() string { 3787 return s.RespMetadata.RequestID 3788 } 3789 3790 type PutContainerPolicyInput struct { 3791 _ struct{} `type:"structure"` 3792 3793 // The name of the container. 3794 // 3795 // ContainerName is a required field 3796 ContainerName *string `min:"1" type:"string" required:"true"` 3797 3798 // The contents of the policy, which includes the following: 3799 // 3800 // * One Version tag 3801 // 3802 // * One Statement tag that contains the standard tags for the policy. 3803 // 3804 // Policy is a required field 3805 Policy *string `min:"1" type:"string" required:"true"` 3806 } 3807 3808 // String returns the string representation. 3809 // 3810 // API parameter values that are decorated as "sensitive" in the API will not 3811 // be included in the string output. The member name will be present, but the 3812 // value will be replaced with "sensitive". 3813 func (s PutContainerPolicyInput) String() string { 3814 return awsutil.Prettify(s) 3815 } 3816 3817 // GoString returns the string representation. 3818 // 3819 // API parameter values that are decorated as "sensitive" in the API will not 3820 // be included in the string output. The member name will be present, but the 3821 // value will be replaced with "sensitive". 3822 func (s PutContainerPolicyInput) GoString() string { 3823 return s.String() 3824 } 3825 3826 // Validate inspects the fields of the type to determine if they are valid. 3827 func (s *PutContainerPolicyInput) Validate() error { 3828 invalidParams := request.ErrInvalidParams{Context: "PutContainerPolicyInput"} 3829 if s.ContainerName == nil { 3830 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 3831 } 3832 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 3833 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 3834 } 3835 if s.Policy == nil { 3836 invalidParams.Add(request.NewErrParamRequired("Policy")) 3837 } 3838 if s.Policy != nil && len(*s.Policy) < 1 { 3839 invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) 3840 } 3841 3842 if invalidParams.Len() > 0 { 3843 return invalidParams 3844 } 3845 return nil 3846 } 3847 3848 // SetContainerName sets the ContainerName field's value. 3849 func (s *PutContainerPolicyInput) SetContainerName(v string) *PutContainerPolicyInput { 3850 s.ContainerName = &v 3851 return s 3852 } 3853 3854 // SetPolicy sets the Policy field's value. 3855 func (s *PutContainerPolicyInput) SetPolicy(v string) *PutContainerPolicyInput { 3856 s.Policy = &v 3857 return s 3858 } 3859 3860 type PutContainerPolicyOutput struct { 3861 _ struct{} `type:"structure"` 3862 } 3863 3864 // String returns the string representation. 3865 // 3866 // API parameter values that are decorated as "sensitive" in the API will not 3867 // be included in the string output. The member name will be present, but the 3868 // value will be replaced with "sensitive". 3869 func (s PutContainerPolicyOutput) String() string { 3870 return awsutil.Prettify(s) 3871 } 3872 3873 // GoString returns the string representation. 3874 // 3875 // API parameter values that are decorated as "sensitive" in the API will not 3876 // be included in the string output. The member name will be present, but the 3877 // value will be replaced with "sensitive". 3878 func (s PutContainerPolicyOutput) GoString() string { 3879 return s.String() 3880 } 3881 3882 type PutCorsPolicyInput struct { 3883 _ struct{} `type:"structure"` 3884 3885 // The name of the container that you want to assign the CORS policy to. 3886 // 3887 // ContainerName is a required field 3888 ContainerName *string `min:"1" type:"string" required:"true"` 3889 3890 // The CORS policy to apply to the container. 3891 // 3892 // CorsPolicy is a required field 3893 CorsPolicy []*CorsRule `min:"1" type:"list" required:"true"` 3894 } 3895 3896 // String returns the string representation. 3897 // 3898 // API parameter values that are decorated as "sensitive" in the API will not 3899 // be included in the string output. The member name will be present, but the 3900 // value will be replaced with "sensitive". 3901 func (s PutCorsPolicyInput) String() string { 3902 return awsutil.Prettify(s) 3903 } 3904 3905 // GoString returns the string representation. 3906 // 3907 // API parameter values that are decorated as "sensitive" in the API will not 3908 // be included in the string output. The member name will be present, but the 3909 // value will be replaced with "sensitive". 3910 func (s PutCorsPolicyInput) GoString() string { 3911 return s.String() 3912 } 3913 3914 // Validate inspects the fields of the type to determine if they are valid. 3915 func (s *PutCorsPolicyInput) Validate() error { 3916 invalidParams := request.ErrInvalidParams{Context: "PutCorsPolicyInput"} 3917 if s.ContainerName == nil { 3918 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 3919 } 3920 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 3921 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 3922 } 3923 if s.CorsPolicy == nil { 3924 invalidParams.Add(request.NewErrParamRequired("CorsPolicy")) 3925 } 3926 if s.CorsPolicy != nil && len(s.CorsPolicy) < 1 { 3927 invalidParams.Add(request.NewErrParamMinLen("CorsPolicy", 1)) 3928 } 3929 if s.CorsPolicy != nil { 3930 for i, v := range s.CorsPolicy { 3931 if v == nil { 3932 continue 3933 } 3934 if err := v.Validate(); err != nil { 3935 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "CorsPolicy", i), err.(request.ErrInvalidParams)) 3936 } 3937 } 3938 } 3939 3940 if invalidParams.Len() > 0 { 3941 return invalidParams 3942 } 3943 return nil 3944 } 3945 3946 // SetContainerName sets the ContainerName field's value. 3947 func (s *PutCorsPolicyInput) SetContainerName(v string) *PutCorsPolicyInput { 3948 s.ContainerName = &v 3949 return s 3950 } 3951 3952 // SetCorsPolicy sets the CorsPolicy field's value. 3953 func (s *PutCorsPolicyInput) SetCorsPolicy(v []*CorsRule) *PutCorsPolicyInput { 3954 s.CorsPolicy = v 3955 return s 3956 } 3957 3958 type PutCorsPolicyOutput struct { 3959 _ struct{} `type:"structure"` 3960 } 3961 3962 // String returns the string representation. 3963 // 3964 // API parameter values that are decorated as "sensitive" in the API will not 3965 // be included in the string output. The member name will be present, but the 3966 // value will be replaced with "sensitive". 3967 func (s PutCorsPolicyOutput) String() string { 3968 return awsutil.Prettify(s) 3969 } 3970 3971 // GoString returns the string representation. 3972 // 3973 // API parameter values that are decorated as "sensitive" in the API will not 3974 // be included in the string output. The member name will be present, but the 3975 // value will be replaced with "sensitive". 3976 func (s PutCorsPolicyOutput) GoString() string { 3977 return s.String() 3978 } 3979 3980 type PutLifecyclePolicyInput struct { 3981 _ struct{} `type:"structure"` 3982 3983 // The name of the container that you want to assign the object lifecycle policy 3984 // to. 3985 // 3986 // ContainerName is a required field 3987 ContainerName *string `min:"1" type:"string" required:"true"` 3988 3989 // The object lifecycle policy to apply to the container. 3990 // 3991 // LifecyclePolicy is a required field 3992 LifecyclePolicy *string `type:"string" required:"true"` 3993 } 3994 3995 // String returns the string representation. 3996 // 3997 // API parameter values that are decorated as "sensitive" in the API will not 3998 // be included in the string output. The member name will be present, but the 3999 // value will be replaced with "sensitive". 4000 func (s PutLifecyclePolicyInput) String() string { 4001 return awsutil.Prettify(s) 4002 } 4003 4004 // GoString returns the string representation. 4005 // 4006 // API parameter values that are decorated as "sensitive" in the API will not 4007 // be included in the string output. The member name will be present, but the 4008 // value will be replaced with "sensitive". 4009 func (s PutLifecyclePolicyInput) GoString() string { 4010 return s.String() 4011 } 4012 4013 // Validate inspects the fields of the type to determine if they are valid. 4014 func (s *PutLifecyclePolicyInput) Validate() error { 4015 invalidParams := request.ErrInvalidParams{Context: "PutLifecyclePolicyInput"} 4016 if s.ContainerName == nil { 4017 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 4018 } 4019 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 4020 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 4021 } 4022 if s.LifecyclePolicy == nil { 4023 invalidParams.Add(request.NewErrParamRequired("LifecyclePolicy")) 4024 } 4025 4026 if invalidParams.Len() > 0 { 4027 return invalidParams 4028 } 4029 return nil 4030 } 4031 4032 // SetContainerName sets the ContainerName field's value. 4033 func (s *PutLifecyclePolicyInput) SetContainerName(v string) *PutLifecyclePolicyInput { 4034 s.ContainerName = &v 4035 return s 4036 } 4037 4038 // SetLifecyclePolicy sets the LifecyclePolicy field's value. 4039 func (s *PutLifecyclePolicyInput) SetLifecyclePolicy(v string) *PutLifecyclePolicyInput { 4040 s.LifecyclePolicy = &v 4041 return s 4042 } 4043 4044 type PutLifecyclePolicyOutput struct { 4045 _ struct{} `type:"structure"` 4046 } 4047 4048 // String returns the string representation. 4049 // 4050 // API parameter values that are decorated as "sensitive" in the API will not 4051 // be included in the string output. The member name will be present, but the 4052 // value will be replaced with "sensitive". 4053 func (s PutLifecyclePolicyOutput) String() string { 4054 return awsutil.Prettify(s) 4055 } 4056 4057 // GoString returns the string representation. 4058 // 4059 // API parameter values that are decorated as "sensitive" in the API will not 4060 // be included in the string output. The member name will be present, but the 4061 // value will be replaced with "sensitive". 4062 func (s PutLifecyclePolicyOutput) GoString() string { 4063 return s.String() 4064 } 4065 4066 type PutMetricPolicyInput struct { 4067 _ struct{} `type:"structure"` 4068 4069 // The name of the container that you want to add the metric policy to. 4070 // 4071 // ContainerName is a required field 4072 ContainerName *string `min:"1" type:"string" required:"true"` 4073 4074 // The metric policy that you want to associate with the container. In the policy, 4075 // you must indicate whether you want MediaStore to send container-level metrics. 4076 // You can also include up to five rules to define groups of objects that you 4077 // want MediaStore to send object-level metrics for. If you include rules in 4078 // the policy, construct each rule with both of the following: 4079 // 4080 // * An object group that defines which objects to include in the group. 4081 // The definition can be a path or a file name, but it can't have more than 4082 // 900 characters. Valid characters are: a-z, A-Z, 0-9, _ (underscore), = 4083 // (equal), : (colon), . (period), - (hyphen), ~ (tilde), / (forward slash), 4084 // and * (asterisk). Wildcards (*) are acceptable. 4085 // 4086 // * An object group name that allows you to refer to the object group. The 4087 // name can't have more than 30 characters. Valid characters are: a-z, A-Z, 4088 // 0-9, and _ (underscore). 4089 // 4090 // MetricPolicy is a required field 4091 MetricPolicy *MetricPolicy `type:"structure" required:"true"` 4092 } 4093 4094 // String returns the string representation. 4095 // 4096 // API parameter values that are decorated as "sensitive" in the API will not 4097 // be included in the string output. The member name will be present, but the 4098 // value will be replaced with "sensitive". 4099 func (s PutMetricPolicyInput) String() string { 4100 return awsutil.Prettify(s) 4101 } 4102 4103 // GoString returns the string representation. 4104 // 4105 // API parameter values that are decorated as "sensitive" in the API will not 4106 // be included in the string output. The member name will be present, but the 4107 // value will be replaced with "sensitive". 4108 func (s PutMetricPolicyInput) GoString() string { 4109 return s.String() 4110 } 4111 4112 // Validate inspects the fields of the type to determine if they are valid. 4113 func (s *PutMetricPolicyInput) Validate() error { 4114 invalidParams := request.ErrInvalidParams{Context: "PutMetricPolicyInput"} 4115 if s.ContainerName == nil { 4116 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 4117 } 4118 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 4119 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 4120 } 4121 if s.MetricPolicy == nil { 4122 invalidParams.Add(request.NewErrParamRequired("MetricPolicy")) 4123 } 4124 if s.MetricPolicy != nil { 4125 if err := s.MetricPolicy.Validate(); err != nil { 4126 invalidParams.AddNested("MetricPolicy", err.(request.ErrInvalidParams)) 4127 } 4128 } 4129 4130 if invalidParams.Len() > 0 { 4131 return invalidParams 4132 } 4133 return nil 4134 } 4135 4136 // SetContainerName sets the ContainerName field's value. 4137 func (s *PutMetricPolicyInput) SetContainerName(v string) *PutMetricPolicyInput { 4138 s.ContainerName = &v 4139 return s 4140 } 4141 4142 // SetMetricPolicy sets the MetricPolicy field's value. 4143 func (s *PutMetricPolicyInput) SetMetricPolicy(v *MetricPolicy) *PutMetricPolicyInput { 4144 s.MetricPolicy = v 4145 return s 4146 } 4147 4148 type PutMetricPolicyOutput struct { 4149 _ struct{} `type:"structure"` 4150 } 4151 4152 // String returns the string representation. 4153 // 4154 // API parameter values that are decorated as "sensitive" in the API will not 4155 // be included in the string output. The member name will be present, but the 4156 // value will be replaced with "sensitive". 4157 func (s PutMetricPolicyOutput) String() string { 4158 return awsutil.Prettify(s) 4159 } 4160 4161 // GoString returns the string representation. 4162 // 4163 // API parameter values that are decorated as "sensitive" in the API will not 4164 // be included in the string output. The member name will be present, but the 4165 // value will be replaced with "sensitive". 4166 func (s PutMetricPolicyOutput) GoString() string { 4167 return s.String() 4168 } 4169 4170 type StartAccessLoggingInput struct { 4171 _ struct{} `type:"structure"` 4172 4173 // The name of the container that you want to start access logging on. 4174 // 4175 // ContainerName is a required field 4176 ContainerName *string `min:"1" type:"string" required:"true"` 4177 } 4178 4179 // String returns the string representation. 4180 // 4181 // API parameter values that are decorated as "sensitive" in the API will not 4182 // be included in the string output. The member name will be present, but the 4183 // value will be replaced with "sensitive". 4184 func (s StartAccessLoggingInput) String() string { 4185 return awsutil.Prettify(s) 4186 } 4187 4188 // GoString returns the string representation. 4189 // 4190 // API parameter values that are decorated as "sensitive" in the API will not 4191 // be included in the string output. The member name will be present, but the 4192 // value will be replaced with "sensitive". 4193 func (s StartAccessLoggingInput) GoString() string { 4194 return s.String() 4195 } 4196 4197 // Validate inspects the fields of the type to determine if they are valid. 4198 func (s *StartAccessLoggingInput) Validate() error { 4199 invalidParams := request.ErrInvalidParams{Context: "StartAccessLoggingInput"} 4200 if s.ContainerName == nil { 4201 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 4202 } 4203 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 4204 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 4205 } 4206 4207 if invalidParams.Len() > 0 { 4208 return invalidParams 4209 } 4210 return nil 4211 } 4212 4213 // SetContainerName sets the ContainerName field's value. 4214 func (s *StartAccessLoggingInput) SetContainerName(v string) *StartAccessLoggingInput { 4215 s.ContainerName = &v 4216 return s 4217 } 4218 4219 type StartAccessLoggingOutput struct { 4220 _ struct{} `type:"structure"` 4221 } 4222 4223 // String returns the string representation. 4224 // 4225 // API parameter values that are decorated as "sensitive" in the API will not 4226 // be included in the string output. The member name will be present, but the 4227 // value will be replaced with "sensitive". 4228 func (s StartAccessLoggingOutput) String() string { 4229 return awsutil.Prettify(s) 4230 } 4231 4232 // GoString returns the string representation. 4233 // 4234 // API parameter values that are decorated as "sensitive" in the API will not 4235 // be included in the string output. The member name will be present, but the 4236 // value will be replaced with "sensitive". 4237 func (s StartAccessLoggingOutput) GoString() string { 4238 return s.String() 4239 } 4240 4241 type StopAccessLoggingInput struct { 4242 _ struct{} `type:"structure"` 4243 4244 // The name of the container that you want to stop access logging on. 4245 // 4246 // ContainerName is a required field 4247 ContainerName *string `min:"1" type:"string" required:"true"` 4248 } 4249 4250 // String returns the string representation. 4251 // 4252 // API parameter values that are decorated as "sensitive" in the API will not 4253 // be included in the string output. The member name will be present, but the 4254 // value will be replaced with "sensitive". 4255 func (s StopAccessLoggingInput) String() string { 4256 return awsutil.Prettify(s) 4257 } 4258 4259 // GoString returns the string representation. 4260 // 4261 // API parameter values that are decorated as "sensitive" in the API will not 4262 // be included in the string output. The member name will be present, but the 4263 // value will be replaced with "sensitive". 4264 func (s StopAccessLoggingInput) GoString() string { 4265 return s.String() 4266 } 4267 4268 // Validate inspects the fields of the type to determine if they are valid. 4269 func (s *StopAccessLoggingInput) Validate() error { 4270 invalidParams := request.ErrInvalidParams{Context: "StopAccessLoggingInput"} 4271 if s.ContainerName == nil { 4272 invalidParams.Add(request.NewErrParamRequired("ContainerName")) 4273 } 4274 if s.ContainerName != nil && len(*s.ContainerName) < 1 { 4275 invalidParams.Add(request.NewErrParamMinLen("ContainerName", 1)) 4276 } 4277 4278 if invalidParams.Len() > 0 { 4279 return invalidParams 4280 } 4281 return nil 4282 } 4283 4284 // SetContainerName sets the ContainerName field's value. 4285 func (s *StopAccessLoggingInput) SetContainerName(v string) *StopAccessLoggingInput { 4286 s.ContainerName = &v 4287 return s 4288 } 4289 4290 type StopAccessLoggingOutput struct { 4291 _ struct{} `type:"structure"` 4292 } 4293 4294 // String returns the string representation. 4295 // 4296 // API parameter values that are decorated as "sensitive" in the API will not 4297 // be included in the string output. The member name will be present, but the 4298 // value will be replaced with "sensitive". 4299 func (s StopAccessLoggingOutput) String() string { 4300 return awsutil.Prettify(s) 4301 } 4302 4303 // GoString returns the string representation. 4304 // 4305 // API parameter values that are decorated as "sensitive" in the API will not 4306 // be included in the string output. The member name will be present, but the 4307 // value will be replaced with "sensitive". 4308 func (s StopAccessLoggingOutput) GoString() string { 4309 return s.String() 4310 } 4311 4312 // A collection of tags associated with a container. Each tag consists of a 4313 // key:value pair, which can be anything you define. Typically, the tag key 4314 // represents a category (such as "environment") and the tag value represents 4315 // a specific value within that category (such as "test," "development," or 4316 // "production"). You can add up to 50 tags to each container. For more information 4317 // about tagging, including naming and usage conventions, see Tagging Resources 4318 // in MediaStore (https://docs.aws.amazon.com/mediastore/latest/ug/tagging.html). 4319 type Tag struct { 4320 _ struct{} `type:"structure"` 4321 4322 // Part of the key:value pair that defines a tag. You can use a tag key to describe 4323 // a category of information, such as "customer." Tag keys are case-sensitive. 4324 // 4325 // Key is a required field 4326 Key *string `min:"1" type:"string" required:"true"` 4327 4328 // Part of the key:value pair that defines a tag. You can use a tag value to 4329 // describe a specific value within a category, such as "companyA" or "companyB." 4330 // Tag values are case-sensitive. 4331 Value *string `type:"string"` 4332 } 4333 4334 // String returns the string representation. 4335 // 4336 // API parameter values that are decorated as "sensitive" in the API will not 4337 // be included in the string output. The member name will be present, but the 4338 // value will be replaced with "sensitive". 4339 func (s Tag) String() string { 4340 return awsutil.Prettify(s) 4341 } 4342 4343 // GoString returns the string representation. 4344 // 4345 // API parameter values that are decorated as "sensitive" in the API will not 4346 // be included in the string output. The member name will be present, but the 4347 // value will be replaced with "sensitive". 4348 func (s Tag) GoString() string { 4349 return s.String() 4350 } 4351 4352 // Validate inspects the fields of the type to determine if they are valid. 4353 func (s *Tag) Validate() error { 4354 invalidParams := request.ErrInvalidParams{Context: "Tag"} 4355 if s.Key == nil { 4356 invalidParams.Add(request.NewErrParamRequired("Key")) 4357 } 4358 if s.Key != nil && len(*s.Key) < 1 { 4359 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4360 } 4361 4362 if invalidParams.Len() > 0 { 4363 return invalidParams 4364 } 4365 return nil 4366 } 4367 4368 // SetKey sets the Key field's value. 4369 func (s *Tag) SetKey(v string) *Tag { 4370 s.Key = &v 4371 return s 4372 } 4373 4374 // SetValue sets the Value field's value. 4375 func (s *Tag) SetValue(v string) *Tag { 4376 s.Value = &v 4377 return s 4378 } 4379 4380 type TagResourceInput struct { 4381 _ struct{} `type:"structure"` 4382 4383 // The Amazon Resource Name (ARN) for the container. 4384 // 4385 // Resource is a required field 4386 Resource *string `min:"1" type:"string" required:"true"` 4387 4388 // An array of key:value pairs that you want to add to the container. You need 4389 // to specify only the tags that you want to add or update. For example, suppose 4390 // a container already has two tags (customer:CompanyA and priority:High). You 4391 // want to change the priority tag and also add a third tag (type:Contract). 4392 // For TagResource, you specify the following tags: priority:Medium, type:Contract. 4393 // The result is that your container has three tags: customer:CompanyA, priority:Medium, 4394 // and type:Contract. 4395 // 4396 // Tags is a required field 4397 Tags []*Tag `min:"1" type:"list" required:"true"` 4398 } 4399 4400 // String returns the string representation. 4401 // 4402 // API parameter values that are decorated as "sensitive" in the API will not 4403 // be included in the string output. The member name will be present, but the 4404 // value will be replaced with "sensitive". 4405 func (s TagResourceInput) String() string { 4406 return awsutil.Prettify(s) 4407 } 4408 4409 // GoString returns the string representation. 4410 // 4411 // API parameter values that are decorated as "sensitive" in the API will not 4412 // be included in the string output. The member name will be present, but the 4413 // value will be replaced with "sensitive". 4414 func (s TagResourceInput) GoString() string { 4415 return s.String() 4416 } 4417 4418 // Validate inspects the fields of the type to determine if they are valid. 4419 func (s *TagResourceInput) Validate() error { 4420 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4421 if s.Resource == nil { 4422 invalidParams.Add(request.NewErrParamRequired("Resource")) 4423 } 4424 if s.Resource != nil && len(*s.Resource) < 1 { 4425 invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) 4426 } 4427 if s.Tags == nil { 4428 invalidParams.Add(request.NewErrParamRequired("Tags")) 4429 } 4430 if s.Tags != nil && len(s.Tags) < 1 { 4431 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 4432 } 4433 if s.Tags != nil { 4434 for i, v := range s.Tags { 4435 if v == nil { 4436 continue 4437 } 4438 if err := v.Validate(); err != nil { 4439 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) 4440 } 4441 } 4442 } 4443 4444 if invalidParams.Len() > 0 { 4445 return invalidParams 4446 } 4447 return nil 4448 } 4449 4450 // SetResource sets the Resource field's value. 4451 func (s *TagResourceInput) SetResource(v string) *TagResourceInput { 4452 s.Resource = &v 4453 return s 4454 } 4455 4456 // SetTags sets the Tags field's value. 4457 func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { 4458 s.Tags = v 4459 return s 4460 } 4461 4462 type TagResourceOutput struct { 4463 _ struct{} `type:"structure"` 4464 } 4465 4466 // String returns the string representation. 4467 // 4468 // API parameter values that are decorated as "sensitive" in the API will not 4469 // be included in the string output. The member name will be present, but the 4470 // value will be replaced with "sensitive". 4471 func (s TagResourceOutput) String() string { 4472 return awsutil.Prettify(s) 4473 } 4474 4475 // GoString returns the string representation. 4476 // 4477 // API parameter values that are decorated as "sensitive" in the API will not 4478 // be included in the string output. The member name will be present, but the 4479 // value will be replaced with "sensitive". 4480 func (s TagResourceOutput) GoString() string { 4481 return s.String() 4482 } 4483 4484 type UntagResourceInput struct { 4485 _ struct{} `type:"structure"` 4486 4487 // The Amazon Resource Name (ARN) for the container. 4488 // 4489 // Resource is a required field 4490 Resource *string `min:"1" type:"string" required:"true"` 4491 4492 // A comma-separated list of keys for tags that you want to remove from the 4493 // container. For example, if your container has two tags (customer:CompanyA 4494 // and priority:High) and you want to remove one of the tags (priority:High), 4495 // you specify the key for the tag that you want to remove (priority). 4496 // 4497 // TagKeys is a required field 4498 TagKeys []*string `type:"list" required:"true"` 4499 } 4500 4501 // String returns the string representation. 4502 // 4503 // API parameter values that are decorated as "sensitive" in the API will not 4504 // be included in the string output. The member name will be present, but the 4505 // value will be replaced with "sensitive". 4506 func (s UntagResourceInput) String() string { 4507 return awsutil.Prettify(s) 4508 } 4509 4510 // GoString returns the string representation. 4511 // 4512 // API parameter values that are decorated as "sensitive" in the API will not 4513 // be included in the string output. The member name will be present, but the 4514 // value will be replaced with "sensitive". 4515 func (s UntagResourceInput) GoString() string { 4516 return s.String() 4517 } 4518 4519 // Validate inspects the fields of the type to determine if they are valid. 4520 func (s *UntagResourceInput) Validate() error { 4521 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4522 if s.Resource == nil { 4523 invalidParams.Add(request.NewErrParamRequired("Resource")) 4524 } 4525 if s.Resource != nil && len(*s.Resource) < 1 { 4526 invalidParams.Add(request.NewErrParamMinLen("Resource", 1)) 4527 } 4528 if s.TagKeys == nil { 4529 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4530 } 4531 4532 if invalidParams.Len() > 0 { 4533 return invalidParams 4534 } 4535 return nil 4536 } 4537 4538 // SetResource sets the Resource field's value. 4539 func (s *UntagResourceInput) SetResource(v string) *UntagResourceInput { 4540 s.Resource = &v 4541 return s 4542 } 4543 4544 // SetTagKeys sets the TagKeys field's value. 4545 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4546 s.TagKeys = v 4547 return s 4548 } 4549 4550 type UntagResourceOutput struct { 4551 _ struct{} `type:"structure"` 4552 } 4553 4554 // String returns the string representation. 4555 // 4556 // API parameter values that are decorated as "sensitive" in the API will not 4557 // be included in the string output. The member name will be present, but the 4558 // value will be replaced with "sensitive". 4559 func (s UntagResourceOutput) String() string { 4560 return awsutil.Prettify(s) 4561 } 4562 4563 // GoString returns the string representation. 4564 // 4565 // API parameter values that are decorated as "sensitive" in the API will not 4566 // be included in the string output. The member name will be present, but the 4567 // value will be replaced with "sensitive". 4568 func (s UntagResourceOutput) GoString() string { 4569 return s.String() 4570 } 4571 4572 const ( 4573 // ContainerLevelMetricsEnabled is a ContainerLevelMetrics enum value 4574 ContainerLevelMetricsEnabled = "ENABLED" 4575 4576 // ContainerLevelMetricsDisabled is a ContainerLevelMetrics enum value 4577 ContainerLevelMetricsDisabled = "DISABLED" 4578 ) 4579 4580 // ContainerLevelMetrics_Values returns all elements of the ContainerLevelMetrics enum 4581 func ContainerLevelMetrics_Values() []string { 4582 return []string{ 4583 ContainerLevelMetricsEnabled, 4584 ContainerLevelMetricsDisabled, 4585 } 4586 } 4587 4588 const ( 4589 // ContainerStatusActive is a ContainerStatus enum value 4590 ContainerStatusActive = "ACTIVE" 4591 4592 // ContainerStatusCreating is a ContainerStatus enum value 4593 ContainerStatusCreating = "CREATING" 4594 4595 // ContainerStatusDeleting is a ContainerStatus enum value 4596 ContainerStatusDeleting = "DELETING" 4597 ) 4598 4599 // ContainerStatus_Values returns all elements of the ContainerStatus enum 4600 func ContainerStatus_Values() []string { 4601 return []string{ 4602 ContainerStatusActive, 4603 ContainerStatusCreating, 4604 ContainerStatusDeleting, 4605 } 4606 } 4607 4608 const ( 4609 // MethodNamePut is a MethodName enum value 4610 MethodNamePut = "PUT" 4611 4612 // MethodNameGet is a MethodName enum value 4613 MethodNameGet = "GET" 4614 4615 // MethodNameDelete is a MethodName enum value 4616 MethodNameDelete = "DELETE" 4617 4618 // MethodNameHead is a MethodName enum value 4619 MethodNameHead = "HEAD" 4620 ) 4621 4622 // MethodName_Values returns all elements of the MethodName enum 4623 func MethodName_Values() []string { 4624 return []string{ 4625 MethodNamePut, 4626 MethodNameGet, 4627 MethodNameDelete, 4628 MethodNameHead, 4629 } 4630 }