diff --git a/CHANGELOG.md b/CHANGELOG.md index 22dad21c78d..ddbbc95b6b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +Release v1.40.32 (2021-08-27) +=== + +### Service Client Updates +* `service/ec2`: Updates service API and documentation + * This release adds the BootMode flag to the ImportImage API and showing the detected BootMode of an ImportImage task. +* `service/elasticmapreduce`: Updates service API and documentation + * Amazon EMR now supports auto-terminating idle EMR clusters. You can specify the idle timeout value when enabling auto-termination for both running and new clusters and Amazon EMR automatically terminates the cluster when idle timeout kicks in. +* `service/s3`: Updates service documentation and examples + * Documentation updates for Amazon S3. + Release v1.40.31 (2021-08-26) === diff --git a/aws/endpoints/defaults.go b/aws/endpoints/defaults.go index a2a8f0f3d1b..f6b19bb1ca1 100644 --- a/aws/endpoints/defaults.go +++ b/aws/endpoints/defaults.go @@ -3924,12 +3924,42 @@ var awsPartition = partition{ "eu-west-1": endpoint{}, "eu-west-2": endpoint{}, "eu-west-3": endpoint{}, - "me-south-1": endpoint{}, - "sa-east-1": endpoint{}, - "us-east-1": endpoint{}, - "us-east-2": endpoint{}, - "us-west-1": endpoint{}, - "us-west-2": endpoint{}, + "fips-ca-central-1": endpoint{ + Hostname: "api.tunneling.iot-fips.ca-central-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "ca-central-1", + }, + }, + "fips-us-east-1": endpoint{ + Hostname: "api.tunneling.iot-fips.us-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-1", + }, + }, + "fips-us-east-2": endpoint{ + Hostname: "api.tunneling.iot-fips.us-east-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-east-2", + }, + }, + "fips-us-west-1": endpoint{ + Hostname: "api.tunneling.iot-fips.us-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-1", + }, + }, + "fips-us-west-2": endpoint{ + Hostname: "api.tunneling.iot-fips.us-west-2.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-west-2", + }, + }, + "me-south-1": endpoint{}, + "sa-east-1": endpoint{}, + "us-east-1": endpoint{}, + "us-east-2": endpoint{}, + "us-west-1": endpoint{}, + "us-west-2": endpoint{}, }, }, "iotthingsgraph": service{ @@ -9658,6 +9688,18 @@ var awsusgovPartition = partition{ "iotsecuredtunneling": service{ Endpoints: endpoints{ + "fips-us-gov-east-1": endpoint{ + Hostname: "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-east-1", + }, + }, + "fips-us-gov-west-1": endpoint{ + Hostname: "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com", + CredentialScope: credentialScope{ + Region: "us-gov-west-1", + }, + }, "us-gov-east-1": endpoint{}, "us-gov-west-1": endpoint{}, }, diff --git a/aws/version.go b/aws/version.go index dad3c5bb125..3629bf74987 100644 --- a/aws/version.go +++ b/aws/version.go @@ -5,4 +5,4 @@ package aws const SDKName = "aws-sdk-go" // SDKVersion is the version of this SDK -const SDKVersion = "1.40.31" +const SDKVersion = "1.40.32" diff --git a/models/apis/ec2/2016-11-15/api-2.json b/models/apis/ec2/2016-11-15/api-2.json index 80a68690994..580a710d457 100755 --- a/models/apis/ec2/2016-11-15/api-2.json +++ b/models/apis/ec2/2016-11-15/api-2.json @@ -19220,7 +19220,8 @@ "shape":"TagSpecificationList", "locationName":"TagSpecification" }, - "UsageOperation":{"shape":"String"} + "UsageOperation":{"shape":"String"}, + "BootMode":{"shape":"BootModeValues"} } }, "ImportImageResult":{ @@ -19358,6 +19359,10 @@ "UsageOperation":{ "shape":"String", "locationName":"usageOperation" + }, + "BootMode":{ + "shape":"BootModeValues", + "locationName":"bootMode" } } }, diff --git a/models/apis/ec2/2016-11-15/docs-2.json b/models/apis/ec2/2016-11-15/docs-2.json index dcd38472563..20a5d530cf3 100755 --- a/models/apis/ec2/2016-11-15/docs-2.json +++ b/models/apis/ec2/2016-11-15/docs-2.json @@ -2082,6 +2082,8 @@ "base": null, "refs": { "Image$BootMode": "

The boot mode of the image. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

", + "ImportImageRequest$BootMode": "

The boot mode of the virtual machine.

", + "ImportImageTask$BootMode": "

The boot mode of the virtual machine.

", "Instance$BootMode": "

The boot mode of the instance. For more information, see Boot modes in the Amazon EC2 User Guide.

", "RegisterImageRequest$BootMode": "

The boot mode of the AMI. For more information, see Boot modes in the Amazon Elastic Compute Cloud User Guide.

" } diff --git a/models/apis/elasticmapreduce/2009-03-31/api-2.json b/models/apis/elasticmapreduce/2009-03-31/api-2.json index ffa821b5a46..a3ac3866f3f 100644 --- a/models/apis/elasticmapreduce/2009-03-31/api-2.json +++ b/models/apis/elasticmapreduce/2009-03-31/api-2.json @@ -242,6 +242,15 @@ {"shape":"InvalidRequestException"} ] }, + "GetAutoTerminationPolicy":{ + "name":"GetAutoTerminationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"GetAutoTerminationPolicyInput"}, + "output":{"shape":"GetAutoTerminationPolicyOutput"} + }, "GetBlockPublicAccessConfiguration":{ "name":"GetBlockPublicAccessConfiguration", "http":{ @@ -465,6 +474,15 @@ "input":{"shape":"PutAutoScalingPolicyInput"}, "output":{"shape":"PutAutoScalingPolicyOutput"} }, + "PutAutoTerminationPolicy":{ + "name":"PutAutoTerminationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"PutAutoTerminationPolicyInput"}, + "output":{"shape":"PutAutoTerminationPolicyOutput"} + }, "PutBlockPublicAccessConfiguration":{ "name":"PutBlockPublicAccessConfiguration", "http":{ @@ -496,6 +514,15 @@ "input":{"shape":"RemoveAutoScalingPolicyInput"}, "output":{"shape":"RemoveAutoScalingPolicyOutput"} }, + "RemoveAutoTerminationPolicy":{ + "name":"RemoveAutoTerminationPolicy", + "http":{ + "method":"POST", + "requestUri":"/" + }, + "input":{"shape":"RemoveAutoTerminationPolicyInput"}, + "output":{"shape":"RemoveAutoTerminationPolicyOutput"} + }, "RemoveManagedScalingPolicy":{ "name":"RemoveManagedScalingPolicy", "http":{ @@ -779,6 +806,12 @@ "StateChangeReason":{"shape":"AutoScalingPolicyStateChangeReason"} } }, + "AutoTerminationPolicy":{ + "type":"structure", + "members":{ + "IdleTimeout":{"shape":"Long"} + } + }, "BlockPublicAccessConfiguration":{ "type":"structure", "required":["BlockPublicSecurityGroupRules"], @@ -1339,6 +1372,19 @@ "LogFile":{"shape":"String"} } }, + "GetAutoTerminationPolicyInput":{ + "type":"structure", + "required":["ClusterId"], + "members":{ + "ClusterId":{"shape":"ClusterId"} + } + }, + "GetAutoTerminationPolicyOutput":{ + "type":"structure", + "members":{ + "AutoTerminationPolicy":{"shape":"AutoTerminationPolicy"} + } + }, "GetBlockPublicAccessConfigurationInput":{ "type":"structure", "members":{ @@ -2361,6 +2407,19 @@ "ClusterArn":{"shape":"ArnType"} } }, + "PutAutoTerminationPolicyInput":{ + "type":"structure", + "required":["ClusterId"], + "members":{ + "ClusterId":{"shape":"ClusterId"}, + "AutoTerminationPolicy":{"shape":"AutoTerminationPolicy"} + } + }, + "PutAutoTerminationPolicyOutput":{ + "type":"structure", + "members":{ + } + }, "PutBlockPublicAccessConfigurationInput":{ "type":"structure", "required":["BlockPublicAccessConfiguration"], @@ -2412,6 +2471,18 @@ "members":{ } }, + "RemoveAutoTerminationPolicyInput":{ + "type":"structure", + "required":["ClusterId"], + "members":{ + "ClusterId":{"shape":"ClusterId"} + } + }, + "RemoveAutoTerminationPolicyOutput":{ + "type":"structure", + "members":{ + } + }, "RemoveManagedScalingPolicyInput":{ "type":"structure", "required":["ClusterId"], @@ -2481,7 +2552,8 @@ "KerberosAttributes":{"shape":"KerberosAttributes"}, "StepConcurrencyLevel":{"shape":"Integer"}, "ManagedScalingPolicy":{"shape":"ManagedScalingPolicy"}, - "PlacementGroupConfigs":{"shape":"PlacementGroupConfigList"} + "PlacementGroupConfigs":{"shape":"PlacementGroupConfigList"}, + "AutoTerminationPolicy":{"shape":"AutoTerminationPolicy"} } }, "RunJobFlowOutput":{ diff --git a/models/apis/elasticmapreduce/2009-03-31/docs-2.json b/models/apis/elasticmapreduce/2009-03-31/docs-2.json index ae4703f8db6..5b84c25ae99 100644 --- a/models/apis/elasticmapreduce/2009-03-31/docs-2.json +++ b/models/apis/elasticmapreduce/2009-03-31/docs-2.json @@ -20,11 +20,12 @@ "DescribeSecurityConfiguration": "

Provides the details of a security configuration by returning the configuration JSON.

", "DescribeStep": "

Provides more detail about the cluster step.

", "DescribeStudio": "

Returns details for the specified Amazon EMR Studio including ID, Name, VPC, Studio access URL, and so on.

", - "GetBlockPublicAccessConfiguration": "

Returns the Amazon EMR block public access configuration for your account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

", + "GetAutoTerminationPolicy": "

Returns the auto-termination policy for an Amazon EMR cluster.

", + "GetBlockPublicAccessConfiguration": "

Returns the Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

", "GetManagedScalingPolicy": "

Fetches the attached managed scaling policy for an Amazon EMR cluster.

", "GetStudioSessionMapping": "

Fetches mapping details for the specified Amazon EMR Studio and identity (user or group).

", "ListBootstrapActions": "

Provides information about the bootstrap actions associated with a cluster.

", - "ListClusters": "

Provides the status of all clusters visible to this account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters in unsorted order per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.

", + "ListClusters": "

Provides the status of all clusters visible to this Amazon Web Services account. Allows you to filter the list of clusters based on certain criteria; for example, filtering by cluster creation date and time or by status. This call returns a maximum of 50 clusters in unsorted order per call, but returns a marker to track the paging of the cluster list across multiple ListClusters calls.

", "ListInstanceFleets": "

Lists all available details about the instance fleets in a cluster.

The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

", "ListInstanceGroups": "

Provides all available details about the instance groups in a cluster.

", "ListInstances": "

Provides information for all active EC2 instances and EC2 instances terminated in the last 30 days, up to a maximum of 2,000. EC2 instances in any of the following states are considered active: AWAITING_FULFILLMENT, PROVISIONING, BOOTSTRAPPING, RUNNING.

", @@ -33,19 +34,21 @@ "ListSecurityConfigurations": "

Lists all the security configurations visible to this account, providing their creation dates and times, and their names. This call returns a maximum of 50 clusters per call, but returns a marker to track the paging of the cluster list across multiple ListSecurityConfigurations calls.

", "ListSteps": "

Provides a list of steps for the cluster in reverse order unless you specify stepIds with the request or filter by StepStates. You can specify a maximum of 10 stepIDs. The CLI automatically paginates results to return a list greater than 50 steps. To return more than 50 steps using the CLI, specify a Marker, which is a pagination token that indicates the next set of steps to retrieve.

", "ListStudioSessionMappings": "

Returns a list of all user or group session mappings for the Amazon EMR Studio specified by StudioId.

", - "ListStudios": "

Returns a list of all Amazon EMR Studios associated with the account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.

", + "ListStudios": "

Returns a list of all Amazon EMR Studios associated with the Amazon Web Services account. The list includes details such as ID, Studio Access URL, and creation time for each Studio.

", "ModifyCluster": "

Modifies the number of steps that can be executed concurrently for the cluster specified using ClusterID.

", "ModifyInstanceFleet": "

Modifies the target On-Demand and target Spot capacities for the instance fleet with the specified InstanceFleetID within the cluster specified using ClusterID. The call either succeeds or fails atomically.

The instance fleet configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions.

", "ModifyInstanceGroups": "

ModifyInstanceGroups modifies the number of nodes and configuration settings of an instance group. The input parameters include the new target instance count for the group and the instance group ID. The call will either succeed or fail atomically.

", "PutAutoScalingPolicy": "

Creates or updates an automatic scaling policy for a core instance group or task instance group in an Amazon EMR cluster. The automatic scaling policy defines how an instance group dynamically adds and terminates EC2 instances in response to the value of a CloudWatch metric.

", - "PutBlockPublicAccessConfiguration": "

Creates or updates an Amazon EMR block public access configuration for your account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

", + "PutAutoTerminationPolicy": "

Creates or updates an auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination.

", + "PutBlockPublicAccessConfiguration": "

Creates or updates an Amazon EMR block public access configuration for your Amazon Web Services account in the current Region. For more information see Configure Block Public Access for Amazon EMR in the Amazon EMR Management Guide.

", "PutManagedScalingPolicy": "

Creates or updates a managed scaling policy for an Amazon EMR cluster. The managed scaling policy defines the limits for resources, such as EC2 instances that can be added or terminated from a cluster. The policy only applies to the core and task nodes. The master node cannot be scaled after initial configuration.

", "RemoveAutoScalingPolicy": "

Removes an automatic scaling policy from a specified instance group within an EMR cluster.

", + "RemoveAutoTerminationPolicy": "

Removes an auto-termination policy from an Amazon EMR cluster.

", "RemoveManagedScalingPolicy": "

Removes a managed scaling policy from a specified EMR cluster.

", "RemoveTags": "

Removes tags from an Amazon EMR resource. Tags make it easier to associate clusters in various ways, such as grouping clusters to track your Amazon EMR resource allocation costs. For more information, see Tag Clusters.

The following example removes the stack tag with value Prod from a cluster:

", "RunJobFlow": "

RunJobFlow creates and starts running a new cluster (job flow). The cluster runs the steps specified. After the steps complete, the cluster stops and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3. If the JobFlowInstancesConfig KeepJobFlowAliveWhenNoSteps parameter is set to TRUE, the cluster transitions to the WAITING state rather than shutting down after the steps have completed.

For additional protection, you can set the JobFlowInstancesConfig TerminationProtected parameter to TRUE to lock the cluster and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.

A maximum of 256 steps are allowed in each job flow.

If your cluster is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, see Add More than 256 Steps to a Cluster in the Amazon EMR Management Guide.

For long running clusters, we recommend that you periodically store your results.

The instance fleets configuration is available only in Amazon EMR versions 4.8.0 and later, excluding 5.0.x versions. The RunJobFlow request can contain InstanceFleets parameters or InstanceGroups parameters, but not both.

", "SetTerminationProtection": "

SetTerminationProtection locks a cluster (job flow) so the EC2 instances in the cluster cannot be terminated by user intervention, an API call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling SetTerminationProtection on a cluster is similar to calling the Amazon EC2 DisableAPITermination API on all EC2 instances in a cluster.

SetTerminationProtection is used to prevent accidental termination of a cluster and to ensure that in the event of an error, the instances persist so that you can recover any data stored in their ephemeral instance storage.

To terminate a cluster that has been locked by setting SetTerminationProtection to true, you must first unlock the job flow by a subsequent call to SetTerminationProtection in which you set the value to false.

For more information, seeManaging Cluster Termination in the Amazon EMR Management Guide.

", - "SetVisibleToAllUsers": "

Sets the Cluster$VisibleToAllUsers value for an EMR cluster. When true, IAM principals in the account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the account root user can perform EMR actions on the cluster, regardless of IAM permissions policies attached to other IAM principals.

This action works on running clusters. When you create a cluster, use the RunJobFlowInput$VisibleToAllUsers parameter.

For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", + "SetVisibleToAllUsers": "

Sets the Cluster$VisibleToAllUsers value for an EMR cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions on the cluster, regardless of IAM permissions policies attached to other IAM principals.

This action works on running clusters. When you create a cluster, use the RunJobFlowInput$VisibleToAllUsers parameter.

For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", "StartNotebookExecution": "

Starts a notebook execution.

", "StopNotebookExecution": "

Stops a notebook execution.

", "TerminateJobFlows": "

TerminateJobFlows shuts a list of clusters (job flows) down. When a job flow is shut down, any step not yet completed is canceled and the EC2 instances on which the cluster is running are stopped. Any log files not already saved are uploaded to Amazon S3 if a LogUri was specified when the cluster was created.

The maximum number of clusters allowed is 10. The call to TerminateJobFlows is asynchronous. Depending on the configuration of the cluster, it may take up to 1-5 minutes for the cluster to completely terminate and release allocated resources, such as Amazon EC2 instances.

", @@ -177,6 +180,14 @@ "AutoScalingPolicyDescription$Status": "

The status of an automatic scaling policy.

" } }, + "AutoTerminationPolicy": { + "base": "

An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see Control cluster termination.

", + "refs": { + "GetAutoTerminationPolicyOutput$AutoTerminationPolicy": "

Specifies the auto-termination policy that is attached to an Amazon EMR cluster.

", + "PutAutoTerminationPolicyInput$AutoTerminationPolicy": "

Specifies the auto-termination policy to attach to the cluster.

", + "RunJobFlowInput$AutoTerminationPolicy": null + } + }, "BlockPublicAccessConfiguration": { "base": "

A configuration for Amazon EMR block public access. When BlockPublicSecurityGroupRules is set to true, Amazon EMR prevents cluster creation if one of the cluster's security groups has a rule that allows inbound traffic from 0.0.0.0/0 or ::/0 on a port, unless the port is specified as an exception using PermittedPublicSecurityGroupRuleRanges.

", "refs": { @@ -196,15 +207,15 @@ "BlockPublicAccessConfiguration$BlockPublicSecurityGroupRules": "

Indicates whether Amazon EMR block public access is enabled (true) or disabled (false). By default, the value is false for accounts that have created EMR clusters before July 2019. For accounts created after this, the default is true.

", "Cluster$AutoTerminate": "

Specifies whether the cluster should terminate after completing all steps.

", "Cluster$TerminationProtected": "

Indicates whether Amazon EMR will lock the cluster to prevent the EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.

", - "Cluster$VisibleToAllUsers": "

Indicates whether the cluster is visible to IAM principals in the account associated with the cluster. When true, IAM principals in the account can perform EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Management Console. IAM principals that are allowed to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", - "JobFlowDetail$VisibleToAllUsers": "

Indicates whether the cluster is visible to IAM principals in the account associated with the cluster. When true, IAM principals in the account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Management Console. IAM principals that are authorized to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", + "Cluster$VisibleToAllUsers": "

Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions on the cluster that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are allowed to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", + "JobFlowDetail$VisibleToAllUsers": "

Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When true, IAM principals in the Amazon Web Services account can perform EMR cluster actions that their IAM policies allow. When false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions, regardless of IAM permissions policies attached to other IAM principals.

The default value is true if a value is not provided when creating a cluster using the EMR API RunJobFlow command, the CLI create-cluster command, or the Amazon Web Services Management Console. IAM principals that are authorized to perform actions on the cluster can use the SetVisibleToAllUsers action to change the value on a running cluster. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", "JobFlowInstancesConfig$KeepJobFlowAliveWhenNoSteps": "

Specifies whether the cluster should remain available after completing all steps. Defaults to true. For more information about configuring cluster termination, see Control Cluster Termination in the EMR Management Guide.

", "JobFlowInstancesConfig$TerminationProtected": "

Specifies whether to lock the cluster to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job-flow error.

", "JobFlowInstancesDetail$KeepJobFlowAliveWhenNoSteps": "

Specifies whether the cluster should remain available after completing all steps.

", "JobFlowInstancesDetail$TerminationProtected": "

Specifies whether the Amazon EC2 instances in the cluster are protected from termination by API calls, user intervention, or in the event of a job-flow error.

", - "RunJobFlowInput$VisibleToAllUsers": "

Set this value to true so that IAM principals in the account associated with the cluster can perform EMR actions on the cluster that their IAM policies allow. This value defaults to true for clusters created using the EMR API or the CLI create-cluster command.

When set to false, only the IAM principal that created the cluster and the account root user can perform EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", + "RunJobFlowInput$VisibleToAllUsers": "

Set this value to true so that IAM principals in the Amazon Web Services account associated with the cluster can perform EMR actions on the cluster that their IAM policies allow. This value defaults to true for clusters created using the EMR API or the CLI create-cluster command.

When set to false, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see Understanding the EMR Cluster VisibleToAllUsers Setting in the Amazon EMRManagement Guide.

", "SetTerminationProtectionInput$TerminationProtected": "

A Boolean that indicates whether to protect the cluster and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.

", - "SetVisibleToAllUsersInput$VisibleToAllUsers": "

A value of true indicates that an IAM principal in the account can perform EMR actions on the cluster that the IAM policies attached to the principal allow. A value of false indicates that only the IAM principal that created the cluster and the Amazon Web Services root user can perform EMR actions on the cluster.

" + "SetVisibleToAllUsersInput$VisibleToAllUsers": "

A value of true indicates that an IAM principal in the Amazon Web Services account can perform EMR actions on the cluster that the IAM policies attached to the principal allow. A value of false indicates that only the IAM principal that created the cluster and the Amazon Web Services root user can perform EMR actions on the cluster.

" } }, "BooleanObject": { @@ -287,6 +298,7 @@ "ClusterSummary$Id": "

The unique identifier for the cluster.

", "DescribeClusterInput$ClusterId": "

The identifier of the cluster to describe.

", "DescribeStepInput$ClusterId": "

The identifier of the cluster with steps to describe.

", + "GetAutoTerminationPolicyInput$ClusterId": "

Specifies the ID of the Amazon EMR cluster for which the auto-termination policy will be fetched.

", "GetManagedScalingPolicyInput$ClusterId": "

Specifies the ID of the cluster for which the managed scaling policy will be fetched.

", "ListBootstrapActionsInput$ClusterId": "

The cluster identifier for the bootstrap actions to list.

", "ListInstanceFleetsInput$ClusterId": "

The unique identifier of the cluster.

", @@ -297,8 +309,10 @@ "ModifyInstanceGroupsInput$ClusterId": "

The ID of the cluster to which the instance group belongs.

", "PutAutoScalingPolicyInput$ClusterId": "

Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

", "PutAutoScalingPolicyOutput$ClusterId": "

Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

", + "PutAutoTerminationPolicyInput$ClusterId": "

Specifies the ID of the Amazon EMR cluster to which the auto-termination policy will be attached.

", "PutManagedScalingPolicyInput$ClusterId": "

Specifies the ID of an EMR cluster where the managed scaling policy is attached.

", "RemoveAutoScalingPolicyInput$ClusterId": "

Specifies the ID of a cluster. The instance group to which the automatic scaling policy is applied is within this cluster.

", + "RemoveAutoTerminationPolicyInput$ClusterId": "

Specifies the ID of the Amazon EMR cluster from which the auto-termination policy will be removed.

", "RemoveManagedScalingPolicyInput$ClusterId": "

Specifies the ID of the cluster from which the managed scaling policy will be removed.

" } }, @@ -662,6 +676,16 @@ "StepStatus$FailureDetails": "

The details for the step failure including reason, message, and log file path where the root cause was identified.

" } }, + "GetAutoTerminationPolicyInput": { + "base": null, + "refs": { + } + }, + "GetAutoTerminationPolicyOutput": { + "base": null, + "refs": { + } + }, "GetBlockPublicAccessConfigurationInput": { "base": null, "refs": { @@ -1256,6 +1280,7 @@ "Long": { "base": null, "refs": { + "AutoTerminationPolicy$IdleTimeout": "

Specifies the amount of idle time in seconds after which the cluster automatically terminates. You can specify a minimum of 60 seconds and a maximum of 604800 seconds (seven days).

", "InstanceGroup$ConfigurationsVersion": "

The version number of the requested configuration specification for this instance group.

", "InstanceGroup$LastSuccessfullyAppliedConfigurationsVersion": "

The version number of a configuration specification that was successfully applied for an instance group last time.

" } @@ -1474,6 +1499,16 @@ "refs": { } }, + "PutAutoTerminationPolicyInput": { + "base": null, + "refs": { + } + }, + "PutAutoTerminationPolicyOutput": { + "base": null, + "refs": { + } + }, "PutBlockPublicAccessConfigurationInput": { "base": null, "refs": { @@ -1510,6 +1545,16 @@ "refs": { } }, + "RemoveAutoTerminationPolicyInput": { + "base": null, + "refs": { + } + }, + "RemoveAutoTerminationPolicyOutput": { + "base": null, + "refs": { + } + }, "RemoveManagedScalingPolicyInput": { "base": null, "refs": { @@ -1880,7 +1925,7 @@ "InstanceGroup$BidPrice": "

If specified, indicates that the instance group uses Spot Instances. This is the maximum price you are willing to pay for Spot Instances. Specify OnDemandPrice to set the amount equal to the On-Demand price, or specify an amount in USD.

", "InstanceGroupStateChangeReason$Message": "

The status change reason description.

", "InstanceStateChangeReason$Message": "

The status change reason description.

", - "ListReleaseLabelsInput$NextToken": "

Specifies the next page of results. If NextToken is not specified, which is usually the case for the first request of ListReleaseLabels, the first page of results are determined by other filtering parameters or by the latest version. The ListReleaseLabels request fails if the identity (account ID) and all filtering parameters are different from the original request, or if the NextToken is expired or tampered with.

", + "ListReleaseLabelsInput$NextToken": "

Specifies the next page of results. If NextToken is not specified, which is usually the case for the first request of ListReleaseLabels, the first page of results are determined by other filtering parameters or by the latest version. The ListReleaseLabels request fails if the identity (Amazon Web Services account ID) and all filtering parameters are different from the original request, or if the NextToken is expired or tampered with.

", "ListReleaseLabelsOutput$NextToken": "

Used to paginate the next page of results if specified in the next ListReleaseLabels request.

", "MetricDimension$Key": "

The dimension name.

", "MetricDimension$Value": "

The dimension value.

", diff --git a/models/apis/s3/2006-03-01/docs-2.json b/models/apis/s3/2006-03-01/docs-2.json index 1be5a900e8b..71497e7fd64 100644 --- a/models/apis/s3/2006-03-01/docs-2.json +++ b/models/apis/s3/2006-03-01/docs-2.json @@ -46,7 +46,7 @@ "GetBucketTagging": "

Returns the tag set associated with the bucket.

To use this operation, you must have permission to perform the s3:GetBucketTagging action. By default, the bucket owner has this permission and can grant this permission to others.

GetBucketTagging has the following special error:

The following operations are related to GetBucketTagging:

", "GetBucketVersioning": "

Returns the versioning state of a bucket.

To retrieve the versioning state of a bucket, you must be the bucket owner.

This implementation also returns the MFA Delete status of the versioning state. If the MFA Delete status is enabled, the bucket owner must use an authentication device to change the versioning state of the bucket.

The following operations are related to GetBucketVersioning:

", "GetBucketWebsite": "

Returns the website configuration for a bucket. To host website on Amazon S3, you can configure a bucket as website by adding a website configuration. For more information about hosting websites, see Hosting Websites on Amazon S3.

This GET action requires the S3:GetBucketWebsite permission. By default, only the bucket owner can read the bucket website configuration. However, bucket owners can allow other users to read the website configuration by writing a bucket policy granting them the S3:GetBucketWebsite permission.

The following operations are related to DeleteBucketWebsite:

", - "GetObject": "

Retrieves objects from Amazon S3. To use GET, you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.

An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure. For example, instead of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.

To get an object from such a logical hierarchy, specify the full key name for the object in the GET operation. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg, specify the resource as /photos/2006/February/sample.jpg. For a path-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket, specify the resource as /examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification.

To distribute large files to many people, you can save bandwidth costs by using BitTorrent. For more information, see Amazon S3 Torrent. For more information about returning the ACL of an object, see GetObjectAcl.

If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this action returns an InvalidObjectStateError error. For information about restoring archived objects, see Restoring Archived Objects.

Encryption request headers, like x-amz-server-side-encryption, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in Amazon Web Services KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys).

Assuming you have permission to read object tags (permission for the s3:GetObjectVersionTagging action), the response also returns the x-amz-tagging-count header that provides the count of number of tags associated with the object. You can use GetObjectTagging to retrieve the tag set associated with an object.

Permissions

You need the s3:GetObject permission for this operation. For more information, see Specifying Permissions in a Policy. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.

Versioning

By default, the GET action returns the current version of an object. To return a different version, use the versionId subresource.

For more information about versioning, see PutBucketVersioning.

Overriding Response Header Values

There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.

You can override values for a set of response headers using the following query parameters. These response header values are sent only on a successful request, that is, when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Amazon S3 accepts when you create an object. The response headers that you can override for the GET response are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. To override these header values in the GET response, you use the following request parameters.

You must sign the request, either using an Authorization header or a presigned URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.

Additional Considerations about Request Headers

If both of the If-Match and If-Unmodified-Since headers are present in the request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since condition evaluates to false; then, S3 returns 200 OK and the data requested.

If both of the If-None-Match and If-Modified-Since headers are present in the request as follows: If-None-Match condition evaluates to false, and; If-Modified-Since condition evaluates to true; then, S3 returns 304 Not Modified response code.

For more information about conditional requests, see RFC 7232.

The following operations are related to GetObject:

", + "GetObject": "

Retrieves objects from Amazon S3. To use GET, you must have READ access to the object. If you grant READ access to the anonymous user, you can return the object without using an authorization header.

An Amazon S3 bucket has no directory hierarchy such as you would find in a typical computer file system. You can, however, create a logical hierarchy by using object key names that imply a folder structure. For example, instead of naming an object sample.jpg, you can name it photos/2006/February/sample.jpg.

To get an object from such a logical hierarchy, specify the full key name for the object in the GET operation. For a virtual hosted-style request example, if you have the object photos/2006/February/sample.jpg, specify the resource as /photos/2006/February/sample.jpg. For a path-style request example, if you have the object photos/2006/February/sample.jpg in the bucket named examplebucket, specify the resource as /examplebucket/photos/2006/February/sample.jpg. For more information about request types, see HTTP Host Header Bucket Specification.

To distribute large files to many people, you can save bandwidth costs by using BitTorrent. For more information, see Amazon S3 Torrent. For more information about returning the ACL of an object, see GetObjectAcl.

If the object you are retrieving is stored in the S3 Glacier or S3 Glacier Deep Archive storage class, or S3 Intelligent-Tiering Archive or S3 Intelligent-Tiering Deep Archive tiers, before you can retrieve the object you must first restore a copy using RestoreObject. Otherwise, this action returns an InvalidObjectStateError error. For information about restoring archived objects, see Restoring Archived Objects.

Encryption request headers, like x-amz-server-side-encryption, should not be sent for GET requests if your object uses server-side encryption with CMKs stored in Amazon Web Services KMS (SSE-KMS) or server-side encryption with Amazon S3–managed encryption keys (SSE-S3). If your object does use these types of keys, you’ll get an HTTP 400 BadRequest error.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you GET the object, you must use the following headers:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys).

Assuming you have the relevant permission to read object tags, the response also returns the x-amz-tagging-count header that provides the count of number of tags associated with the object. You can use GetObjectTagging to retrieve the tag set associated with an object.

Permissions

You need the relevant read object (or version) permission for this operation. For more information, see Specifying Permissions in a Policy. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.

Versioning

By default, the GET action returns the current version of an object. To return a different version, use the versionId subresource.

For more information about versioning, see PutBucketVersioning.

Overriding Response Header Values

There are times when you want to override certain response header values in a GET response. For example, you might override the Content-Disposition response header value in your GET request.

You can override values for a set of response headers using the following query parameters. These response header values are sent only on a successful request, that is, when status code 200 OK is returned. The set of headers you can override using these parameters is a subset of the headers that Amazon S3 accepts when you create an object. The response headers that you can override for the GET response are Content-Type, Content-Language, Expires, Cache-Control, Content-Disposition, and Content-Encoding. To override these header values in the GET response, you use the following request parameters.

You must sign the request, either using an Authorization header or a presigned URL, when using these parameters. They cannot be used with an unsigned (anonymous) request.

Additional Considerations about Request Headers

If both of the If-Match and If-Unmodified-Since headers are present in the request as follows: If-Match condition evaluates to true, and; If-Unmodified-Since condition evaluates to false; then, S3 returns 200 OK and the data requested.

If both of the If-None-Match and If-Modified-Since headers are present in the request as follows: If-None-Match condition evaluates to false, and; If-Modified-Since condition evaluates to true; then, S3 returns 304 Not Modified response code.

For more information about conditional requests, see RFC 7232.

The following operations are related to GetObject:

", "GetObjectAcl": "

Returns the access control list (ACL) of an object. To use this operation, you must have READ_ACP access to the object.

This action is not supported by Amazon S3 on Outposts.

Versioning

By default, GET returns ACL information about the current version of an object. To return ACL information about a different version, use the versionId subresource.

The following operations are related to GetObjectAcl:

", "GetObjectLegalHold": "

Gets an object's current Legal Hold status. For more information, see Locking Objects.

This action is not supported by Amazon S3 on Outposts.

", "GetObjectLockConfiguration": "

Gets the Object Lock configuration for a bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket. For more information, see Locking Objects.

", @@ -55,7 +55,7 @@ "GetObjectTorrent": "

Returns torrent files from a bucket. BitTorrent can save you bandwidth when you're distributing large files. For more information about BitTorrent, see Using BitTorrent with Amazon S3.

You can get torrent only for objects that are less than 5 GB in size, and that are not encrypted using server-side encryption with a customer-provided encryption key.

To use GET, you must have READ access to the object.

This action is not supported by Amazon S3 on Outposts.

The following action is related to GetObjectTorrent:

", "GetPublicAccessBlock": "

Retrieves the PublicAccessBlock configuration for an Amazon S3 bucket. To use this operation, you must have the s3:GetBucketPublicAccessBlock permission. For more information about Amazon S3 permissions, see Specifying Permissions in a Policy.

When Amazon S3 evaluates the PublicAccessBlock configuration for a bucket or an object, it checks the PublicAccessBlock configuration for both the bucket (or the bucket that contains the object) and the bucket owner's account. If the PublicAccessBlock settings are different between the bucket and the account, Amazon S3 uses the most restrictive combination of the bucket-level and account-level settings.

For more information about when Amazon S3 considers a bucket or an object public, see The Meaning of \"Public\".

The following operations are related to GetPublicAccessBlock:

", "HeadBucket": "

This action is useful to determine if a bucket exists and you have permission to access it. The action returns a 200 OK if the bucket exists and you have permission to access it.

If the bucket does not exist or you do not have permission to access it, the HEAD request returns a generic 404 Not Found or 403 Forbidden code. A message body is not included, so you cannot determine the exception beyond these error codes.

To use this operation, you must have permissions to perform the s3:ListBucket action. The bucket owner has this permission by default and can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

To use this API against an access point, you must provide the alias of the access point in place of the bucket name or specify the access point ARN. When using the access point ARN, you must direct requests to the access point hostname. The access point hostname takes the form AccessPointName-AccountId.s3-accesspoint.Region.amazonaws.com. When using the Amazon Web Services SDKs, you provide the ARN in place of the bucket name. For more information see, Using access points.

", - "HeadObject": "

The HEAD action retrieves metadata from an object without returning the object itself. This action is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.

A HEAD request has the same options as a GET action on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic 404 Not Found or 403 Forbidden code. It is not possible to retrieve the exact exception beyond these error codes.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys).

Request headers are limited to 8 KB in size. For more information, see Common Request Headers.

Consider the following when using request headers:

For more information about conditional requests, see RFC 7232.

Permissions

You need the s3:GetObject permission for this operation. For more information, see Specifying Permissions in a Policy. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.

The following action is related to HeadObject:

", + "HeadObject": "

The HEAD action retrieves metadata from an object without returning the object itself. This action is useful if you're only interested in an object's metadata. To use HEAD, you must have READ access to the object.

A HEAD request has the same options as a GET action on an object. The response is identical to the GET response except that there is no response body. Because of this, if the HEAD request generates an error, it returns a generic 404 Not Found or 403 Forbidden code. It is not possible to retrieve the exact exception beyond these error codes.

If you encrypt an object by using server-side encryption with customer-provided encryption keys (SSE-C) when you store the object in Amazon S3, then when you retrieve the metadata from the object, you must use the following headers:

For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided Encryption Keys).

Request headers are limited to 8 KB in size. For more information, see Common Request Headers.

Consider the following when using request headers:

For more information about conditional requests, see RFC 7232.

Permissions

You need the relevant read object (or version) permission for this operation. For more information, see Specifying Permissions in a Policy. If the object you request does not exist, the error Amazon S3 returns depends on whether you also have the s3:ListBucket permission.

The following action is related to HeadObject:

", "ListBucketAnalyticsConfigurations": "

Lists the analytics configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.

This action supports list pagination and does not return more than 100 configurations at a time. You should always check the IsTruncated element in the response. If there are no more configurations to list, IsTruncated is set to false. If there are more configurations to list, IsTruncated is set to true, and there will be a value in NextContinuationToken. You use the NextContinuationToken value to continue the pagination of the list by passing the value in continuation-token in the request to GET the next page.

To use this operation, you must have permissions to perform the s3:GetAnalyticsConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

For information about Amazon S3 analytics feature, see Amazon S3 Analytics – Storage Class Analysis.

The following operations are related to ListBucketAnalyticsConfigurations:

", "ListBucketIntelligentTieringConfigurations": "

Lists the S3 Intelligent-Tiering configuration from the specified bucket.

The S3 Intelligent-Tiering storage class is designed to optimize storage costs by automatically moving data to the most cost-effective storage access tier, without additional operational overhead. S3 Intelligent-Tiering delivers automatic cost savings by moving data between access tiers, when access patterns change.

The S3 Intelligent-Tiering storage class is suitable for objects larger than 128 KB that you plan to store for at least 30 days. If the size of an object is less than 128 KB, it is not eligible for auto-tiering. Smaller objects can be stored, but they are always charged at the frequent access tier rates in the S3 Intelligent-Tiering storage class.

If you delete an object before the end of the 30-day minimum storage duration period, you are charged for 30 days. For more information, see Storage class for automatically optimizing frequently and infrequently accessed objects.

Operations related to ListBucketIntelligentTieringConfigurations include:

", "ListBucketInventoryConfigurations": "

Returns a list of inventory configurations for the bucket. You can have up to 1,000 analytics configurations per bucket.

This action supports list pagination and does not return more than 100 configurations at a time. Always check the IsTruncated element in the response. If there are no more configurations to list, IsTruncated is set to false. If there are more configurations to list, IsTruncated is set to true, and there is a value in NextContinuationToken. You use the NextContinuationToken value to continue the pagination of the list by passing the value in continuation-token in the request to GET the next page.

To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration action. The bucket owner has this permission by default. The bucket owner can grant this permission to others. For more information about permissions, see Permissions Related to Bucket Subresource Operations and Managing Access Permissions to Your Amazon S3 Resources.

For information about the Amazon S3 inventory feature, see Amazon S3 Inventory

The following operations are related to ListBucketInventoryConfigurations:

", @@ -567,8 +567,8 @@ "BypassGovernanceRetention": { "base": null, "refs": { - "DeleteObjectRequest$BypassGovernanceRetention": "

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation.

", - "DeleteObjectsRequest$BypassGovernanceRetention": "

Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. You must have sufficient permissions to perform this operation.

", + "DeleteObjectRequest$BypassGovernanceRetention": "

Indicates whether S3 Object Lock should bypass Governance-mode restrictions to process this operation. To use this header, you must have the s3:PutBucketPublicAccessBlock permission.

", + "DeleteObjectsRequest$BypassGovernanceRetention": "

Specifies whether you want to delete this object even if it has a Governance-type Object Lock in place. To use this header, you must have the s3:PutBucketPublicAccessBlock permission.

", "PutObjectRetentionRequest$BypassGovernanceRetention": "

Indicates whether this action should bypass Governance-mode restrictions.

" } }, diff --git a/models/apis/s3/2006-03-01/examples-1.json b/models/apis/s3/2006-03-01/examples-1.json index 8a021893892..5f8e6731e3f 100644 --- a/models/apis/s3/2006-03-01/examples-1.json +++ b/models/apis/s3/2006-03-01/examples-1.json @@ -84,10 +84,13 @@ "CreateBucket": [ { "input": { - "Bucket": "examplebucket" + "Bucket": "examplebucket", + "CreateBucketConfiguration": { + "LocationConstraint": "eu-west-1" + } }, "output": { - "Location": "/examplebucket" + "Location": "http://examplebucket..s3.amazonaws.com/" }, "comments": { "input": { @@ -95,19 +98,16 @@ "output": { } }, - "description": "The following example creates a bucket.", - "id": "to-create-a-bucket--1472851826060", - "title": "To create a bucket " + "description": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", + "id": "to-create-a-bucket-in-a-specific-region-1483399072992", + "title": "To create a bucket in a specific region" }, { "input": { - "Bucket": "examplebucket", - "CreateBucketConfiguration": { - "LocationConstraint": "eu-west-1" - } + "Bucket": "examplebucket" }, "output": { - "Location": "http://examplebucket..s3.amazonaws.com/" + "Location": "/examplebucket" }, "comments": { "input": { @@ -115,9 +115,9 @@ "output": { } }, - "description": "The following example creates a bucket. The request specifies an AWS region where to create the bucket.", - "id": "to-create-a-bucket-in-a-specific-region-1483399072992", - "title": "To create a bucket in a specific region" + "description": "The following example creates a bucket.", + "id": "to-create-a-bucket--1472851826060", + "title": "To create a bucket " } ], "CreateMultipartUpload": [ @@ -292,10 +292,11 @@ { "input": { "Bucket": "examplebucket", - "Key": "HappyFace.jpg" + "Key": "HappyFace.jpg", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "output": { - "VersionId": "null" + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "comments": { "input": { @@ -303,18 +304,17 @@ "output": { } }, - "description": "The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.", - "id": "to-remove-tag-set-from-an-object-1483145342862", - "title": "To remove tag set from an object" + "description": "The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.", + "id": "to-remove-tag-set-from-an-object-version-1483145285913", + "title": "To remove tag set from an object version" }, { "input": { "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + "Key": "HappyFace.jpg" }, "output": { - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + "VersionId": "null" }, "comments": { "input": { @@ -322,9 +322,9 @@ "output": { } }, - "description": "The following example removes tag set associated with the specified object version. The request specifies both the object key and object version.", - "id": "to-remove-tag-set-from-an-object-version-1483145285913", - "title": "To remove tag set from an object version" + "description": "The following example removes tag set associated with the specified object. If the bucket is versioning enabled, the operation removes tag set from the latest object version.", + "id": "to-remove-tag-set-from-an-object-1483145342862", + "title": "To remove tag set from an object" } ], "DeleteObjects": [ @@ -334,10 +334,12 @@ "Delete": { "Objects": [ { - "Key": "objectkey1" + "Key": "HappyFace.jpg", + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" }, { - "Key": "objectkey2" + "Key": "HappyFace.jpg", + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" } ], "Quiet": false @@ -346,14 +348,12 @@ "output": { "Deleted": [ { - "DeleteMarker": "true", - "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", - "Key": "objectkey1" + "Key": "HappyFace.jpg", + "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" }, { - "DeleteMarker": "true", - "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", - "Key": "objectkey2" + "Key": "HappyFace.jpg", + "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" } ] }, @@ -363,9 +363,9 @@ "output": { } }, - "description": "The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.", - "id": "to-delete-multiple-objects-from-a-versioned-bucket-1483146248805", - "title": "To delete multiple objects from a versioned bucket" + "description": "The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.", + "id": "to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737", + "title": "To delete multiple object versions from a versioned bucket" }, { "input": { @@ -373,12 +373,10 @@ "Delete": { "Objects": [ { - "Key": "HappyFace.jpg", - "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + "Key": "objectkey1" }, { - "Key": "HappyFace.jpg", - "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + "Key": "objectkey2" } ], "Quiet": false @@ -387,12 +385,14 @@ "output": { "Deleted": [ { - "Key": "HappyFace.jpg", - "VersionId": "yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd" + "DeleteMarker": "true", + "DeleteMarkerVersionId": "A._w1z6EFiCF5uhtQMDal9JDkID9tQ7F", + "Key": "objectkey1" }, { - "Key": "HappyFace.jpg", - "VersionId": "2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b" + "DeleteMarker": "true", + "DeleteMarkerVersionId": "iOd_ORxhkKe_e8G8_oSGxt2PjsCZKlkt", + "Key": "objectkey2" } ] }, @@ -402,9 +402,9 @@ "output": { } }, - "description": "The following example deletes objects from a bucket. The request specifies object versions. S3 deletes specific object versions and returns the key and versions of deleted objects in the response.", - "id": "to-delete-multiple-object-versions-from-a-versioned-bucket-1483147087737", - "title": "To delete multiple object versions from a versioned bucket" + "description": "The following example deletes objects from a bucket. The bucket is versioned, and the request does not specify the object version to delete. In this case, all versions remain in the bucket and S3 adds a delete marker.", + "id": "to-delete-multiple-objects-from-a-versioned-bucket-1483146248805", + "title": "To delete multiple objects from a versioned bucket" } ], "GetBucketCors": [ @@ -840,17 +840,20 @@ { "input": { "Bucket": "examplebucket", - "Key": "exampleobject", - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + "Key": "HappyFace.jpg" }, "output": { "TagSet": [ { - "Key": "Key1", - "Value": "Value1" + "Key": "Key4", + "Value": "Value4" + }, + { + "Key": "Key3", + "Value": "Value3" } ], - "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" + "VersionId": "null" }, "comments": { "input": { @@ -858,27 +861,24 @@ "output": { } }, - "description": "The following example retrieves tag set of an object. The request specifies object version.", - "id": "to-retrieve-tag-set-of-a-specific-object-version-1483400283663", - "title": "To retrieve tag set of a specific object version" + "description": "The following example retrieves tag set of an object.", + "id": "to-retrieve-tag-set-of-an-object-1481833847896", + "title": "To retrieve tag set of an object" }, { "input": { "Bucket": "examplebucket", - "Key": "HappyFace.jpg" + "Key": "exampleobject", + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "output": { "TagSet": [ { - "Key": "Key4", - "Value": "Value4" - }, - { - "Key": "Key3", - "Value": "Value3" + "Key": "Key1", + "Value": "Value1" } ], - "VersionId": "null" + "VersionId": "ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI" }, "comments": { "input": { @@ -886,9 +886,9 @@ "output": { } }, - "description": "The following example retrieves tag set of an object.", - "id": "to-retrieve-tag-set-of-an-object-1481833847896", - "title": "To retrieve tag set of an object" + "description": "The following example retrieves tag set of an object. The request specifies object version.", + "id": "to-retrieve-tag-set-of-a-specific-object-version-1483400283663", + "title": "To retrieve tag set of a specific object version" } ], "GetObjectTorrent": [ @@ -989,37 +989,47 @@ "ListMultipartUploads": [ { "input": { - "Bucket": "examplebucket" + "Bucket": "examplebucket", + "KeyMarker": "nextkeyfrompreviousresponse", + "MaxUploads": "2", + "UploadIdMarker": "valuefrompreviousresponse" }, "output": { + "Bucket": "acl1", + "IsTruncated": true, + "KeyMarker": "", + "MaxUploads": "2", + "NextKeyMarker": "someobjectkey", + "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", + "UploadIdMarker": "", "Uploads": [ { "Initiated": "2014-05-01T05:40:58.000Z", "Initiator": { - "DisplayName": "display-name", + "DisplayName": "ownder-display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "Key": "JavaFile", "Owner": { - "DisplayName": "display-name", - "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + "DisplayName": "mohanataws", + "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "StorageClass": "STANDARD", - "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" + "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" }, { "Initiated": "2014-05-01T05:41:27.000Z", "Initiator": { - "DisplayName": "display-name", + "DisplayName": "ownder-display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "Key": "JavaFile", "Owner": { - "DisplayName": "display-name", + "DisplayName": "ownder-display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "StorageClass": "STANDARD", - "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" + "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" } ] }, @@ -1029,53 +1039,43 @@ "output": { } }, - "description": "The following example lists in-progress multipart uploads on a specific bucket.", - "id": "to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260", - "title": "To list in-progress multipart uploads on a bucket" + "description": "The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.", + "id": "list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748", + "title": "List next set of multipart uploads when previous result is truncated" }, { "input": { - "Bucket": "examplebucket", - "KeyMarker": "nextkeyfrompreviousresponse", - "MaxUploads": "2", - "UploadIdMarker": "valuefrompreviousresponse" + "Bucket": "examplebucket" }, "output": { - "Bucket": "acl1", - "IsTruncated": true, - "KeyMarker": "", - "MaxUploads": "2", - "NextKeyMarker": "someobjectkey", - "NextUploadIdMarker": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--", - "UploadIdMarker": "", "Uploads": [ { "Initiated": "2014-05-01T05:40:58.000Z", "Initiator": { - "DisplayName": "ownder-display-name", + "DisplayName": "display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "Key": "JavaFile", "Owner": { - "DisplayName": "mohanataws", - "ID": "852b113e7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" + "DisplayName": "display-name", + "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "StorageClass": "STANDARD", - "UploadId": "gZ30jIqlUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" + "UploadId": "examplelUa.CInXklLQtSMJITdUnoZ1Y5GACB5UckOtspm5zbDMCkPF_qkfZzMiFZ6dksmcnqxJyIBvQMG9X9Q--" }, { "Initiated": "2014-05-01T05:41:27.000Z", "Initiator": { - "DisplayName": "ownder-display-name", + "DisplayName": "display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "Key": "JavaFile", "Owner": { - "DisplayName": "ownder-display-name", + "DisplayName": "display-name", "ID": "examplee7a2f25102679df27bb0ae12b3f85be6f290b936c4393484be31bebcc" }, "StorageClass": "STANDARD", - "UploadId": "b7tZSqIlo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" + "UploadId": "examplelo91lv1iwvWpvCiJWugw2xXLPAD7Z8cJyX9.WiIRgNrdG6Ldsn.9FtS63TCl1Uf5faTB.1U5Ckcbmdw--" } ] }, @@ -1085,9 +1085,9 @@ "output": { } }, - "description": "The following example specifies the upload-id-marker and key-marker from previous truncated response to retrieve next setup of multipart uploads.", - "id": "list-next-set-of-multipart-uploads-when-previous-result-is-truncated-1482428106748", - "title": "List next set of multipart uploads when previous result is truncated" + "description": "The following example lists in-progress multipart uploads on a specific bucket.", + "id": "to-list-in-progress-multipart-uploads-on-a-bucket-1481852775260", + "title": "To list in-progress multipart uploads on a bucket" } ], "ListObjectVersions": [ @@ -1567,13 +1567,16 @@ "PutObject": [ { "input": { - "Body": "filetoupload", + "Body": "HappyFace.jpg", "Bucket": "examplebucket", - "Key": "objectkey" + "Key": "HappyFace.jpg", + "ServerSideEncryption": "AES256", + "StorageClass": "STANDARD_IA" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" + "ServerSideEncryption": "AES256", + "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" }, "comments": { "input": { @@ -1581,20 +1584,22 @@ "output": { } }, - "description": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", - "id": "to-create-an-object-1483147613675", - "title": "To create an object." + "description": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", + "id": "to-upload-an-object-(specify-optional-headers)", + "title": "To upload an object (specify optional headers)" }, { "input": { - "Body": "c:\\HappyFace.jpg", + "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "HappyFace.jpg", + "Key": "exampleobject", + "ServerSideEncryption": "AES256", "Tagging": "key1=value1&key2=value2" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" + "ServerSideEncryption": "AES256", + "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" }, "comments": { "input": { @@ -1602,19 +1607,19 @@ "output": { } }, - "description": "The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.", - "id": "to-upload-an-object-and-specify-optional-tags-1481762310955", - "title": "To upload an object and specify optional tags" + "description": "The following example uploads and object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", + "id": "to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831", + "title": "To upload an object and specify server-side encryption and object tags" }, { "input": { - "Body": "HappyFace.jpg", + "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "HappyFace.jpg" + "Key": "objectkey" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" + "VersionId": "Bvq0EDKxOcXLJXNo_Lkz37eM3R4pfzyQ" }, "comments": { "input": { @@ -1622,22 +1627,23 @@ "output": { } }, - "description": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", - "id": "to-upload-an-object-1481760101010", - "title": "To upload an object" + "description": "The following example creates an object. If the bucket is versioning enabled, S3 returns version ID in response.", + "id": "to-create-an-object-1483147613675", + "title": "To create an object." }, { "input": { - "Body": "HappyFace.jpg", + "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "HappyFace.jpg", - "ServerSideEncryption": "AES256", - "StorageClass": "STANDARD_IA" + "Key": "exampleobject", + "Metadata": { + "metadata1": "value1", + "metadata2": "value2" + } }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "ServerSideEncryption": "AES256", - "VersionId": "CG612hodqujkf8FaaNfp8U..FIhLROcp" + "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" }, "comments": { "input": { @@ -1645,22 +1651,20 @@ "output": { } }, - "description": "The following example uploads an object. The request specifies optional request headers to directs S3 to use specific storage class and use server-side encryption.", - "id": "to-upload-an-object-(specify-optional-headers)", - "title": "To upload an object (specify optional headers)" + "description": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", + "id": "to-upload-object-and-specify-user-defined-metadata-1483396974757", + "title": "To upload object and specify user-defined metadata" }, { "input": { + "ACL": "authenticated-read", "Body": "filetoupload", "Bucket": "examplebucket", - "Key": "exampleobject", - "ServerSideEncryption": "AES256", - "Tagging": "key1=value1&key2=value2" + "Key": "exampleobject" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "ServerSideEncryption": "AES256", - "VersionId": "Ri.vC6qVlA4dEnjgRV4ZHsHoFIjqEMNt" + "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" }, "comments": { "input": { @@ -1668,20 +1672,19 @@ "output": { } }, - "description": "The following example uploads and object. The request specifies the optional server-side encryption option. The request also specifies optional object tags. If the bucket is versioning enabled, S3 returns version ID in response.", - "id": "to-upload-an-object-and-specify-server-side-encryption-and-object-tags-1483398331831", - "title": "To upload an object and specify server-side encryption and object tags" + "description": "The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.", + "id": "to-upload-an-object-and-specify-canned-acl-1483397779571", + "title": "To upload an object and specify canned ACL." }, { "input": { - "ACL": "authenticated-read", - "Body": "filetoupload", + "Body": "HappyFace.jpg", "Bucket": "examplebucket", - "Key": "exampleobject" + "Key": "HappyFace.jpg" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "VersionId": "Kirh.unyZwjQ69YxcQLA8z4F5j3kJJKr" + "VersionId": "tpf3zF08nBplQK1XLOefGskR7mGDwcDk" }, "comments": { "input": { @@ -1689,23 +1692,20 @@ "output": { } }, - "description": "The following example uploads and object. The request specifies optional canned ACL (access control list) to all READ access to authenticated users. If the bucket is versioning enabled, S3 returns version ID in response.", - "id": "to-upload-an-object-and-specify-canned-acl-1483397779571", - "title": "To upload an object and specify canned ACL." + "description": "The following example uploads an object to a versioning-enabled bucket. The source file is specified using Windows file syntax. S3 returns VersionId of the newly created object.", + "id": "to-upload-an-object-1481760101010", + "title": "To upload an object" }, { "input": { - "Body": "filetoupload", + "Body": "c:\\HappyFace.jpg", "Bucket": "examplebucket", - "Key": "exampleobject", - "Metadata": { - "metadata1": "value1", - "metadata2": "value2" - } + "Key": "HappyFace.jpg", + "Tagging": "key1=value1&key2=value2" }, "output": { "ETag": "\"6805f2cfc46c0f04559748bb039d69ae\"", - "VersionId": "pSKidl4pHBiNwukdbcPXAIs.sshFFOc0" + "VersionId": "psM2sYY4.o1501dSx8wMvnkOzSBB.V4a" }, "comments": { "input": { @@ -1713,9 +1713,9 @@ "output": { } }, - "description": "The following example creates an object. The request also specifies optional metadata. If the bucket is versioning enabled, S3 returns version ID in response.", - "id": "to-upload-object-and-specify-user-defined-metadata-1483396974757", - "title": "To upload object and specify user-defined metadata" + "description": "The following example uploads an object. The request specifies optional object tags. The bucket is versioned, therefore S3 returns version ID of the newly created object.", + "id": "to-upload-an-object-and-specify-optional-tags-1481762310955", + "title": "To upload an object and specify optional tags" } ], "PutObjectAcl": [ @@ -1826,14 +1826,15 @@ "input": { "Bucket": "examplebucket", "CopySource": "/bucketname/sourceobjectkey", + "CopySourceRange": "bytes=1-100000", "Key": "examplelargeobject", - "PartNumber": "1", + "PartNumber": "2", "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" }, "output": { "CopyPartResult": { - "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"", - "LastModified": "2016-12-29T21:24:43.000Z" + "ETag": "\"65d16d19e65a7508a51f043180edcc36\"", + "LastModified": "2016-12-29T21:44:28.000Z" } }, "comments": { @@ -1842,23 +1843,22 @@ "output": { } }, - "description": "The following example uploads a part of a multipart upload by copying data from an existing object as data source.", - "id": "to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348", - "title": "To upload a part by copying data from an existing object as data source" + "description": "The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.", + "id": "to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594", + "title": "To upload a part by copying byte range from an existing object as data source" }, { "input": { "Bucket": "examplebucket", "CopySource": "/bucketname/sourceobjectkey", - "CopySourceRange": "bytes=1-100000", "Key": "examplelargeobject", - "PartNumber": "2", + "PartNumber": "1", "UploadId": "exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--" }, "output": { "CopyPartResult": { - "ETag": "\"65d16d19e65a7508a51f043180edcc36\"", - "LastModified": "2016-12-29T21:44:28.000Z" + "ETag": "\"b0c6f0e7e054ab8fa2536a2677f8734d\"", + "LastModified": "2016-12-29T21:24:43.000Z" } }, "comments": { @@ -1867,9 +1867,9 @@ "output": { } }, - "description": "The following example uploads a part of a multipart upload by copying a specified byte range from an existing object as data source.", - "id": "to-upload-a-part-by-copying-byte-range-from-an-existing-object-as-data-source-1483048068594", - "title": "To upload a part by copying byte range from an existing object as data source" + "description": "The following example uploads a part of a multipart upload by copying data from an existing object as data source.", + "id": "to-upload-a-part-by-copying-data-from-an-existing-object-as-data-source-1483046746348", + "title": "To upload a part by copying data from an existing object as data source" } ] } diff --git a/models/endpoints/endpoints.json b/models/endpoints/endpoints.json index 4bc1249f276..d1b81652e19 100644 --- a/models/endpoints/endpoints.json +++ b/models/endpoints/endpoints.json @@ -3796,6 +3796,36 @@ "eu-west-1" : { }, "eu-west-2" : { }, "eu-west-3" : { }, + "fips-ca-central-1" : { + "credentialScope" : { + "region" : "ca-central-1" + }, + "hostname" : "api.tunneling.iot-fips.ca-central-1.amazonaws.com" + }, + "fips-us-east-1" : { + "credentialScope" : { + "region" : "us-east-1" + }, + "hostname" : "api.tunneling.iot-fips.us-east-1.amazonaws.com" + }, + "fips-us-east-2" : { + "credentialScope" : { + "region" : "us-east-2" + }, + "hostname" : "api.tunneling.iot-fips.us-east-2.amazonaws.com" + }, + "fips-us-west-1" : { + "credentialScope" : { + "region" : "us-west-1" + }, + "hostname" : "api.tunneling.iot-fips.us-west-1.amazonaws.com" + }, + "fips-us-west-2" : { + "credentialScope" : { + "region" : "us-west-2" + }, + "hostname" : "api.tunneling.iot-fips.us-west-2.amazonaws.com" + }, "me-south-1" : { }, "sa-east-1" : { }, "us-east-1" : { }, @@ -9324,6 +9354,18 @@ }, "iotsecuredtunneling" : { "endpoints" : { + "fips-us-gov-east-1" : { + "credentialScope" : { + "region" : "us-gov-east-1" + }, + "hostname" : "api.tunneling.iot-fips.us-gov-east-1.amazonaws.com" + }, + "fips-us-gov-west-1" : { + "credentialScope" : { + "region" : "us-gov-west-1" + }, + "hostname" : "api.tunneling.iot-fips.us-gov-west-1.amazonaws.com" + }, "us-gov-east-1" : { }, "us-gov-west-1" : { } } diff --git a/service/ec2/api.go b/service/ec2/api.go index a67d8b9fa85..a18c8b80cf0 100644 --- a/service/ec2/api.go +++ b/service/ec2/api.go @@ -92089,6 +92089,9 @@ type ImportImageInput struct { // Valid values: i386 | x86_64 | arm64 Architecture *string `type:"string"` + // The boot mode of the virtual machine. + BootMode *string `type:"string" enum:"BootModeValues"` + // The client-specific data. ClientData *ClientData `type:"structure"` @@ -92199,6 +92202,12 @@ func (s *ImportImageInput) SetArchitecture(v string) *ImportImageInput { return s } +// SetBootMode sets the BootMode field's value. +func (s *ImportImageInput) SetBootMode(v string) *ImportImageInput { + s.BootMode = &v + return s +} + // SetClientData sets the ClientData field's value. func (s *ImportImageInput) SetClientData(v *ClientData) *ImportImageInput { s.ClientData = v @@ -92499,6 +92508,9 @@ type ImportImageTask struct { // Valid values: i386 | x86_64 | arm64 Architecture *string `locationName:"architecture" type:"string"` + // The boot mode of the virtual machine. + BootMode *string `locationName:"bootMode" type:"string" enum:"BootModeValues"` + // A description of the import task. Description *string `locationName:"description" type:"string"` @@ -92564,6 +92576,12 @@ func (s *ImportImageTask) SetArchitecture(v string) *ImportImageTask { return s } +// SetBootMode sets the BootMode field's value. +func (s *ImportImageTask) SetBootMode(v string) *ImportImageTask { + s.BootMode = &v + return s +} + // SetDescription sets the Description field's value. func (s *ImportImageTask) SetDescription(v string) *ImportImageTask { s.Description = &v diff --git a/service/emr/api.go b/service/emr/api.go index 4be6f9cdb56..138e9a93c20 100644 --- a/service/emr/api.go +++ b/service/emr/api.go @@ -1572,6 +1572,80 @@ func (c *EMR) DescribeStudioWithContext(ctx aws.Context, input *DescribeStudioIn return out, req.Send() } +const opGetAutoTerminationPolicy = "GetAutoTerminationPolicy" + +// GetAutoTerminationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the GetAutoTerminationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See GetAutoTerminationPolicy for more information on using the GetAutoTerminationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the GetAutoTerminationPolicyRequest method. +// req, resp := client.GetAutoTerminationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetAutoTerminationPolicy +func (c *EMR) GetAutoTerminationPolicyRequest(input *GetAutoTerminationPolicyInput) (req *request.Request, output *GetAutoTerminationPolicyOutput) { + op := &request.Operation{ + Name: opGetAutoTerminationPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &GetAutoTerminationPolicyInput{} + } + + output = &GetAutoTerminationPolicyOutput{} + req = c.newRequest(op, input, output) + return +} + +// GetAutoTerminationPolicy API operation for Amazon EMR. +// +// Returns the auto-termination policy for an Amazon EMR cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EMR's +// API operation GetAutoTerminationPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/GetAutoTerminationPolicy +func (c *EMR) GetAutoTerminationPolicy(input *GetAutoTerminationPolicyInput) (*GetAutoTerminationPolicyOutput, error) { + req, out := c.GetAutoTerminationPolicyRequest(input) + return out, req.Send() +} + +// GetAutoTerminationPolicyWithContext is the same as GetAutoTerminationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See GetAutoTerminationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) GetAutoTerminationPolicyWithContext(ctx aws.Context, input *GetAutoTerminationPolicyInput, opts ...request.Option) (*GetAutoTerminationPolicyOutput, error) { + req, out := c.GetAutoTerminationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opGetBlockPublicAccessConfiguration = "GetBlockPublicAccessConfiguration" // GetBlockPublicAccessConfigurationRequest generates a "aws/request.Request" representing the @@ -1616,9 +1690,9 @@ func (c *EMR) GetBlockPublicAccessConfigurationRequest(input *GetBlockPublicAcce // GetBlockPublicAccessConfiguration API operation for Amazon EMR. // -// Returns the Amazon EMR block public access configuration for your account -// in the current Region. For more information see Configure Block Public Access -// for Amazon EMR (https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html) +// Returns the Amazon EMR block public access configuration for your Amazon +// Web Services account in the current Region. For more information see Configure +// Block Public Access for Amazon EMR (https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html) // in the Amazon EMR Management Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -2007,11 +2081,12 @@ func (c *EMR) ListClustersRequest(input *ListClustersInput) (req *request.Reques // ListClusters API operation for Amazon EMR. // -// Provides the status of all clusters visible to this account. Allows you to -// filter the list of clusters based on certain criteria; for example, filtering -// by cluster creation date and time or by status. This call returns a maximum -// of 50 clusters in unsorted order per call, but returns a marker to track -// the paging of the cluster list across multiple ListClusters calls. +// Provides the status of all clusters visible to this Amazon Web Services account. +// Allows you to filter the list of clusters based on certain criteria; for +// example, filtering by cluster creation date and time or by status. This call +// returns a maximum of 50 clusters in unsorted order per call, but returns +// a marker to track the paging of the cluster list across multiple ListClusters +// calls. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3297,9 +3372,9 @@ func (c *EMR) ListStudiosRequest(input *ListStudiosInput) (req *request.Request, // ListStudios API operation for Amazon EMR. // -// Returns a list of all Amazon EMR Studios associated with the account. The -// list includes details such as ID, Studio Access URL, and creation time for -// each Studio. +// Returns a list of all Amazon EMR Studios associated with the Amazon Web Services +// account. The list includes details such as ID, Studio Access URL, and creation +// time for each Studio. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions // with awserr.Error's Code and Message methods to get detailed information about @@ -3724,6 +3799,84 @@ func (c *EMR) PutAutoScalingPolicyWithContext(ctx aws.Context, input *PutAutoSca return out, req.Send() } +const opPutAutoTerminationPolicy = "PutAutoTerminationPolicy" + +// PutAutoTerminationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the PutAutoTerminationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See PutAutoTerminationPolicy for more information on using the PutAutoTerminationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the PutAutoTerminationPolicyRequest method. +// req, resp := client.PutAutoTerminationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy +func (c *EMR) PutAutoTerminationPolicyRequest(input *PutAutoTerminationPolicyInput) (req *request.Request, output *PutAutoTerminationPolicyOutput) { + op := &request.Operation{ + Name: opPutAutoTerminationPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &PutAutoTerminationPolicyInput{} + } + + output = &PutAutoTerminationPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// PutAutoTerminationPolicy API operation for Amazon EMR. +// +// Creates or updates an auto-termination policy for an Amazon EMR cluster. +// An auto-termination policy defines the amount of idle time in seconds after +// which a cluster automatically terminates. For alternative cluster termination +// options, see Control cluster termination (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html). +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EMR's +// API operation PutAutoTerminationPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/PutAutoTerminationPolicy +func (c *EMR) PutAutoTerminationPolicy(input *PutAutoTerminationPolicyInput) (*PutAutoTerminationPolicyOutput, error) { + req, out := c.PutAutoTerminationPolicyRequest(input) + return out, req.Send() +} + +// PutAutoTerminationPolicyWithContext is the same as PutAutoTerminationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See PutAutoTerminationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) PutAutoTerminationPolicyWithContext(ctx aws.Context, input *PutAutoTerminationPolicyInput, opts ...request.Option) (*PutAutoTerminationPolicyOutput, error) { + req, out := c.PutAutoTerminationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opPutBlockPublicAccessConfiguration = "PutBlockPublicAccessConfiguration" // PutBlockPublicAccessConfigurationRequest generates a "aws/request.Request" representing the @@ -3770,8 +3923,8 @@ func (c *EMR) PutBlockPublicAccessConfigurationRequest(input *PutBlockPublicAcce // PutBlockPublicAccessConfiguration API operation for Amazon EMR. // // Creates or updates an Amazon EMR block public access configuration for your -// account in the current Region. For more information see Configure Block Public -// Access for Amazon EMR (https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html) +// Amazon Web Services account in the current Region. For more information see +// Configure Block Public Access for Amazon EMR (https://docs.aws.amazon.com/emr/latest/ManagementGuide/configure-block-public-access.html) // in the Amazon EMR Management Guide. // // Returns awserr.Error for service API and SDK errors. Use runtime type assertions @@ -3965,6 +4118,81 @@ func (c *EMR) RemoveAutoScalingPolicyWithContext(ctx aws.Context, input *RemoveA return out, req.Send() } +const opRemoveAutoTerminationPolicy = "RemoveAutoTerminationPolicy" + +// RemoveAutoTerminationPolicyRequest generates a "aws/request.Request" representing the +// client's request for the RemoveAutoTerminationPolicy operation. The "output" return +// value will be populated with the request's response once the request completes +// successfully. +// +// Use "Send" method on the returned Request to send the API call to the service. +// the "output" return value is not valid until after Send returns without error. +// +// See RemoveAutoTerminationPolicy for more information on using the RemoveAutoTerminationPolicy +// API call, and error handling. +// +// This method is useful when you want to inject custom logic or configuration +// into the SDK's request lifecycle. Such as custom headers, or retry logic. +// +// +// // Example sending a request using the RemoveAutoTerminationPolicyRequest method. +// req, resp := client.RemoveAutoTerminationPolicyRequest(params) +// +// err := req.Send() +// if err == nil { // resp is now filled +// fmt.Println(resp) +// } +// +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoTerminationPolicy +func (c *EMR) RemoveAutoTerminationPolicyRequest(input *RemoveAutoTerminationPolicyInput) (req *request.Request, output *RemoveAutoTerminationPolicyOutput) { + op := &request.Operation{ + Name: opRemoveAutoTerminationPolicy, + HTTPMethod: "POST", + HTTPPath: "/", + } + + if input == nil { + input = &RemoveAutoTerminationPolicyInput{} + } + + output = &RemoveAutoTerminationPolicyOutput{} + req = c.newRequest(op, input, output) + req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) + return +} + +// RemoveAutoTerminationPolicy API operation for Amazon EMR. +// +// Removes an auto-termination policy from an Amazon EMR cluster. +// +// Returns awserr.Error for service API and SDK errors. Use runtime type assertions +// with awserr.Error's Code and Message methods to get detailed information about +// the error. +// +// See the AWS API reference guide for Amazon EMR's +// API operation RemoveAutoTerminationPolicy for usage and error information. +// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticmapreduce-2009-03-31/RemoveAutoTerminationPolicy +func (c *EMR) RemoveAutoTerminationPolicy(input *RemoveAutoTerminationPolicyInput) (*RemoveAutoTerminationPolicyOutput, error) { + req, out := c.RemoveAutoTerminationPolicyRequest(input) + return out, req.Send() +} + +// RemoveAutoTerminationPolicyWithContext is the same as RemoveAutoTerminationPolicy with the addition of +// the ability to pass a context and additional request options. +// +// See RemoveAutoTerminationPolicy for details on how to use this API operation. +// +// The context must be non-nil and will be used for request cancellation. If +// the context is nil a panic will occur. In the future the SDK may create +// sub-contexts for http.Requests. See https://golang.org/pkg/context/ +// for more information on using Contexts. +func (c *EMR) RemoveAutoTerminationPolicyWithContext(ctx aws.Context, input *RemoveAutoTerminationPolicyInput, opts ...request.Option) (*RemoveAutoTerminationPolicyOutput, error) { + req, out := c.RemoveAutoTerminationPolicyRequest(input) + req.SetContext(ctx) + req.ApplyOptions(opts...) + return out, req.Send() +} + const opRemoveManagedScalingPolicy = "RemoveManagedScalingPolicy" // RemoveManagedScalingPolicyRequest generates a "aws/request.Request" representing the @@ -4377,10 +4605,11 @@ func (c *EMR) SetVisibleToAllUsersRequest(input *SetVisibleToAllUsersInput) (req // SetVisibleToAllUsers API operation for Amazon EMR. // // Sets the Cluster$VisibleToAllUsers value for an EMR cluster. When true, IAM -// principals in the account can perform EMR cluster actions that their IAM -// policies allow. When false, only the IAM principal that created the cluster -// and the account root user can perform EMR actions on the cluster, regardless -// of IAM permissions policies attached to other IAM principals. +// principals in the Amazon Web Services account can perform EMR cluster actions +// that their IAM policies allow. When false, only the IAM principal that created +// the cluster and the Amazon Web Services account root user can perform EMR +// actions on the cluster, regardless of IAM permissions policies attached to +// other IAM principals. // // This action works on running clusters. When you create a cluster, use the // RunJobFlowInput$VisibleToAllUsers parameter. @@ -5464,6 +5693,35 @@ func (s *AutoScalingPolicyStatus) SetStateChangeReason(v *AutoScalingPolicyState return s } +// An auto-termination policy for an Amazon EMR cluster. An auto-termination +// policy defines the amount of idle time in seconds after which a cluster automatically +// terminates. For alternative cluster termination options, see Control cluster +// termination (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html). +type AutoTerminationPolicy struct { + _ struct{} `type:"structure"` + + // Specifies the amount of idle time in seconds after which the cluster automatically + // terminates. You can specify a minimum of 60 seconds and a maximum of 604800 + // seconds (seven days). + IdleTimeout *int64 `type:"long"` +} + +// String returns the string representation +func (s AutoTerminationPolicy) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s AutoTerminationPolicy) GoString() string { + return s.String() +} + +// SetIdleTimeout sets the IdleTimeout field's value. +func (s *AutoTerminationPolicy) SetIdleTimeout(v int64) *AutoTerminationPolicy { + s.IdleTimeout = &v + return s +} + // A configuration for Amazon EMR block public access. When BlockPublicSecurityGroupRules // is set to true, Amazon EMR prevents cluster creation if one of the cluster's // security groups has a rule that allows inbound traffic from 0.0.0.0/0 or @@ -6063,19 +6321,20 @@ type Cluster struct { // of a cluster error. TerminationProtected *bool `type:"boolean"` - // Indicates whether the cluster is visible to IAM principals in the account - // associated with the cluster. When true, IAM principals in the account can - // perform EMR cluster actions on the cluster that their IAM policies allow. - // When false, only the IAM principal that created the cluster and the account - // root user can perform EMR actions, regardless of IAM permissions policies - // attached to other IAM principals. + // Indicates whether the cluster is visible to IAM principals in the Amazon + // Web Services account associated with the cluster. When true, IAM principals + // in the Amazon Web Services account can perform EMR cluster actions on the + // cluster that their IAM policies allow. When false, only the IAM principal + // that created the cluster and the Amazon Web Services account root user can + // perform EMR actions, regardless of IAM permissions policies attached to other + // IAM principals. // // The default value is true if a value is not provided when creating a cluster // using the EMR API RunJobFlow command, the CLI create-cluster (https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html) - // command, or the Management Console. IAM principals that are allowed to perform - // actions on the cluster can use the SetVisibleToAllUsers action to change - // the value on a running cluster. For more information, see Understanding the - // EMR Cluster VisibleToAllUsers Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) + // command, or the Amazon Web Services Management Console. IAM principals that + // are allowed to perform actions on the cluster can use the SetVisibleToAllUsers + // action to change the value on a running cluster. For more information, see + // Understanding the EMR Cluster VisibleToAllUsers Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) // in the Amazon EMRManagement Guide. VisibleToAllUsers *bool `type:"boolean"` } @@ -8205,6 +8464,68 @@ func (s *FailureDetails) SetReason(v string) *FailureDetails { return s } +type GetAutoTerminationPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the ID of the Amazon EMR cluster for which the auto-termination + // policy will be fetched. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s GetAutoTerminationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAutoTerminationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *GetAutoTerminationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "GetAutoTerminationPolicyInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *GetAutoTerminationPolicyInput) SetClusterId(v string) *GetAutoTerminationPolicyInput { + s.ClusterId = &v + return s +} + +type GetAutoTerminationPolicyOutput struct { + _ struct{} `type:"structure"` + + // Specifies the auto-termination policy that is attached to an Amazon EMR cluster. + AutoTerminationPolicy *AutoTerminationPolicy `type:"structure"` +} + +// String returns the string representation +func (s GetAutoTerminationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s GetAutoTerminationPolicyOutput) GoString() string { + return s.String() +} + +// SetAutoTerminationPolicy sets the AutoTerminationPolicy field's value. +func (s *GetAutoTerminationPolicyOutput) SetAutoTerminationPolicy(v *AutoTerminationPolicy) *GetAutoTerminationPolicyOutput { + s.AutoTerminationPolicy = v + return s +} + type GetBlockPublicAccessConfigurationInput struct { _ struct{} `type:"structure"` } @@ -10583,19 +10904,19 @@ type JobFlowDetail struct { // is empty. SupportedProducts []*string `type:"list"` - // Indicates whether the cluster is visible to IAM principals in the account - // associated with the cluster. When true, IAM principals in the account can - // perform EMR cluster actions that their IAM policies allow. When false, only - // the IAM principal that created the cluster and the account root user can - // perform EMR actions, regardless of IAM permissions policies attached to other - // IAM principals. + // Indicates whether the cluster is visible to IAM principals in the Amazon + // Web Services account associated with the cluster. When true, IAM principals + // in the Amazon Web Services account can perform EMR cluster actions that their + // IAM policies allow. When false, only the IAM principal that created the cluster + // and the Amazon Web Services account root user can perform EMR actions, regardless + // of IAM permissions policies attached to other IAM principals. // // The default value is true if a value is not provided when creating a cluster // using the EMR API RunJobFlow command, the CLI create-cluster (https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html) - // command, or the Management Console. IAM principals that are authorized to - // perform actions on the cluster can use the SetVisibleToAllUsers action to - // change the value on a running cluster. For more information, see Understanding - // the EMR Cluster VisibleToAllUsers Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) + // command, or the Amazon Web Services Management Console. IAM principals that + // are authorized to perform actions on the cluster can use the SetVisibleToAllUsers + // action to change the value on a running cluster. For more information, see + // Understanding the EMR Cluster VisibleToAllUsers Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) // in the Amazon EMRManagement Guide. VisibleToAllUsers *bool `type:"boolean"` } @@ -11877,9 +12198,9 @@ type ListReleaseLabelsInput struct { // Specifies the next page of results. If NextToken is not specified, which // is usually the case for the first request of ListReleaseLabels, the first // page of results are determined by other filtering parameters or by the latest - // version. The ListReleaseLabels request fails if the identity (account ID) - // and all filtering parameters are different from the original request, or - // if the NextToken is expired or tampered with. + // version. The ListReleaseLabels request fails if the identity (Amazon Web + // Services account ID) and all filtering parameters are different from the + // original request, or if the NextToken is expired or tampered with. NextToken *string `type:"string"` } @@ -13205,6 +13526,68 @@ func (s *PutAutoScalingPolicyOutput) SetInstanceGroupId(v string) *PutAutoScalin return s } +type PutAutoTerminationPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the auto-termination policy to attach to the cluster. + AutoTerminationPolicy *AutoTerminationPolicy `type:"structure"` + + // Specifies the ID of the Amazon EMR cluster to which the auto-termination + // policy will be attached. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s PutAutoTerminationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAutoTerminationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *PutAutoTerminationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "PutAutoTerminationPolicyInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetAutoTerminationPolicy sets the AutoTerminationPolicy field's value. +func (s *PutAutoTerminationPolicyInput) SetAutoTerminationPolicy(v *AutoTerminationPolicy) *PutAutoTerminationPolicyInput { + s.AutoTerminationPolicy = v + return s +} + +// SetClusterId sets the ClusterId field's value. +func (s *PutAutoTerminationPolicyInput) SetClusterId(v string) *PutAutoTerminationPolicyInput { + s.ClusterId = &v + return s +} + +type PutAutoTerminationPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s PutAutoTerminationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s PutAutoTerminationPolicyOutput) GoString() string { + return s.String() +} + type PutBlockPublicAccessConfigurationInput struct { _ struct{} `type:"structure"` @@ -13447,6 +13830,59 @@ func (s RemoveAutoScalingPolicyOutput) GoString() string { return s.String() } +type RemoveAutoTerminationPolicyInput struct { + _ struct{} `type:"structure"` + + // Specifies the ID of the Amazon EMR cluster from which the auto-termination + // policy will be removed. + // + // ClusterId is a required field + ClusterId *string `type:"string" required:"true"` +} + +// String returns the string representation +func (s RemoveAutoTerminationPolicyInput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAutoTerminationPolicyInput) GoString() string { + return s.String() +} + +// Validate inspects the fields of the type to determine if they are valid. +func (s *RemoveAutoTerminationPolicyInput) Validate() error { + invalidParams := request.ErrInvalidParams{Context: "RemoveAutoTerminationPolicyInput"} + if s.ClusterId == nil { + invalidParams.Add(request.NewErrParamRequired("ClusterId")) + } + + if invalidParams.Len() > 0 { + return invalidParams + } + return nil +} + +// SetClusterId sets the ClusterId field's value. +func (s *RemoveAutoTerminationPolicyInput) SetClusterId(v string) *RemoveAutoTerminationPolicyInput { + s.ClusterId = &v + return s +} + +type RemoveAutoTerminationPolicyOutput struct { + _ struct{} `type:"structure"` +} + +// String returns the string representation +func (s RemoveAutoTerminationPolicyOutput) String() string { + return awsutil.Prettify(s) +} + +// GoString returns the string representation +func (s RemoveAutoTerminationPolicyOutput) GoString() string { + return s.String() +} + type RemoveManagedScalingPolicyInput struct { _ struct{} `type:"structure"` @@ -13591,6 +14027,12 @@ type RunJobFlowInput struct { // to launch and terminate EC2 instances in an instance group. AutoScalingRole *string `type:"string"` + // An auto-termination policy for an Amazon EMR cluster. An auto-termination + // policy defines the amount of idle time in seconds after which a cluster automatically + // terminates. For alternative cluster termination options, see Control cluster + // termination (https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html). + AutoTerminationPolicy *AutoTerminationPolicy `type:"structure"` + // A list of bootstrap actions to run before Hadoop starts on the cluster nodes. BootstrapActions []*BootstrapActionConfig `type:"list"` @@ -13743,16 +14185,17 @@ type RunJobFlowInput struct { // A list of tags to associate with a cluster and propagate to Amazon EC2 instances. Tags []*Tag `type:"list"` - // Set this value to true so that IAM principals in the account associated with - // the cluster can perform EMR actions on the cluster that their IAM policies - // allow. This value defaults to true for clusters created using the EMR API - // or the CLI create-cluster (https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html) + // Set this value to true so that IAM principals in the Amazon Web Services + // account associated with the cluster can perform EMR actions on the cluster + // that their IAM policies allow. This value defaults to true for clusters created + // using the EMR API or the CLI create-cluster (https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html) // command. // // When set to false, only the IAM principal that created the cluster and the - // account root user can perform EMR actions for the cluster, regardless of - // the IAM permissions policies attached to other IAM principals. For more information, - // see Understanding the EMR Cluster VisibleToAllUsers Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) + // Amazon Web Services account root user can perform EMR actions for the cluster, + // regardless of the IAM permissions policies attached to other IAM principals. + // For more information, see Understanding the EMR Cluster VisibleToAllUsers + // Setting (https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_iam_emr-with-iam.html#security_set_visible_to_all_users) // in the Amazon EMRManagement Guide. VisibleToAllUsers *bool `type:"boolean"` } @@ -13852,6 +14295,12 @@ func (s *RunJobFlowInput) SetAutoScalingRole(v string) *RunJobFlowInput { return s } +// SetAutoTerminationPolicy sets the AutoTerminationPolicy field's value. +func (s *RunJobFlowInput) SetAutoTerminationPolicy(v *AutoTerminationPolicy) *RunJobFlowInput { + s.AutoTerminationPolicy = v + return s +} + // SetBootstrapActions sets the BootstrapActions field's value. func (s *RunJobFlowInput) SetBootstrapActions(v []*BootstrapActionConfig) *RunJobFlowInput { s.BootstrapActions = v @@ -14592,11 +15041,11 @@ type SetVisibleToAllUsersInput struct { // JobFlowIds is a required field JobFlowIds []*string `type:"list" required:"true"` - // A value of true indicates that an IAM principal in the account can perform - // EMR actions on the cluster that the IAM policies attached to the principal - // allow. A value of false indicates that only the IAM principal that created - // the cluster and the Amazon Web Services root user can perform EMR actions - // on the cluster. + // A value of true indicates that an IAM principal in the Amazon Web Services + // account can perform EMR actions on the cluster that the IAM policies attached + // to the principal allow. A value of false indicates that only the IAM principal + // that created the cluster and the Amazon Web Services root user can perform + // EMR actions on the cluster. // // VisibleToAllUsers is a required field VisibleToAllUsers *bool `type:"boolean" required:"true"` diff --git a/service/emr/emriface/interface.go b/service/emr/emriface/interface.go index 9d29115bbbf..3167e5a5c48 100644 --- a/service/emr/emriface/interface.go +++ b/service/emr/emriface/interface.go @@ -132,6 +132,10 @@ type EMRAPI interface { DescribeStudioWithContext(aws.Context, *emr.DescribeStudioInput, ...request.Option) (*emr.DescribeStudioOutput, error) DescribeStudioRequest(*emr.DescribeStudioInput) (*request.Request, *emr.DescribeStudioOutput) + GetAutoTerminationPolicy(*emr.GetAutoTerminationPolicyInput) (*emr.GetAutoTerminationPolicyOutput, error) + GetAutoTerminationPolicyWithContext(aws.Context, *emr.GetAutoTerminationPolicyInput, ...request.Option) (*emr.GetAutoTerminationPolicyOutput, error) + GetAutoTerminationPolicyRequest(*emr.GetAutoTerminationPolicyInput) (*request.Request, *emr.GetAutoTerminationPolicyOutput) + GetBlockPublicAccessConfiguration(*emr.GetBlockPublicAccessConfigurationInput) (*emr.GetBlockPublicAccessConfigurationOutput, error) GetBlockPublicAccessConfigurationWithContext(aws.Context, *emr.GetBlockPublicAccessConfigurationInput, ...request.Option) (*emr.GetBlockPublicAccessConfigurationOutput, error) GetBlockPublicAccessConfigurationRequest(*emr.GetBlockPublicAccessConfigurationInput) (*request.Request, *emr.GetBlockPublicAccessConfigurationOutput) @@ -237,6 +241,10 @@ type EMRAPI interface { PutAutoScalingPolicyWithContext(aws.Context, *emr.PutAutoScalingPolicyInput, ...request.Option) (*emr.PutAutoScalingPolicyOutput, error) PutAutoScalingPolicyRequest(*emr.PutAutoScalingPolicyInput) (*request.Request, *emr.PutAutoScalingPolicyOutput) + PutAutoTerminationPolicy(*emr.PutAutoTerminationPolicyInput) (*emr.PutAutoTerminationPolicyOutput, error) + PutAutoTerminationPolicyWithContext(aws.Context, *emr.PutAutoTerminationPolicyInput, ...request.Option) (*emr.PutAutoTerminationPolicyOutput, error) + PutAutoTerminationPolicyRequest(*emr.PutAutoTerminationPolicyInput) (*request.Request, *emr.PutAutoTerminationPolicyOutput) + PutBlockPublicAccessConfiguration(*emr.PutBlockPublicAccessConfigurationInput) (*emr.PutBlockPublicAccessConfigurationOutput, error) PutBlockPublicAccessConfigurationWithContext(aws.Context, *emr.PutBlockPublicAccessConfigurationInput, ...request.Option) (*emr.PutBlockPublicAccessConfigurationOutput, error) PutBlockPublicAccessConfigurationRequest(*emr.PutBlockPublicAccessConfigurationInput) (*request.Request, *emr.PutBlockPublicAccessConfigurationOutput) @@ -249,6 +257,10 @@ type EMRAPI interface { RemoveAutoScalingPolicyWithContext(aws.Context, *emr.RemoveAutoScalingPolicyInput, ...request.Option) (*emr.RemoveAutoScalingPolicyOutput, error) RemoveAutoScalingPolicyRequest(*emr.RemoveAutoScalingPolicyInput) (*request.Request, *emr.RemoveAutoScalingPolicyOutput) + RemoveAutoTerminationPolicy(*emr.RemoveAutoTerminationPolicyInput) (*emr.RemoveAutoTerminationPolicyOutput, error) + RemoveAutoTerminationPolicyWithContext(aws.Context, *emr.RemoveAutoTerminationPolicyInput, ...request.Option) (*emr.RemoveAutoTerminationPolicyOutput, error) + RemoveAutoTerminationPolicyRequest(*emr.RemoveAutoTerminationPolicyInput) (*request.Request, *emr.RemoveAutoTerminationPolicyOutput) + RemoveManagedScalingPolicy(*emr.RemoveManagedScalingPolicyInput) (*emr.RemoveManagedScalingPolicyOutput, error) RemoveManagedScalingPolicyWithContext(aws.Context, *emr.RemoveManagedScalingPolicyInput, ...request.Option) (*emr.RemoveManagedScalingPolicyOutput, error) RemoveManagedScalingPolicyRequest(*emr.RemoveManagedScalingPolicyInput) (*request.Request, *emr.RemoveManagedScalingPolicyOutput) diff --git a/service/s3/api.go b/service/s3/api.go index 331533077e3..61921dd51f7 100644 --- a/service/s3/api.go +++ b/service/s3/api.go @@ -4564,16 +4564,15 @@ func (c *S3) GetObjectRequest(input *GetObjectInput) (req *request.Request, outp // For more information about SSE-C, see Server-Side Encryption (Using Customer-Provided // Encryption Keys) (https://docs.aws.amazon.com/AmazonS3/latest/dev/ServerSideEncryptionCustomerKeys.html). // -// Assuming you have permission to read object tags (permission for the s3:GetObjectVersionTagging -// action), the response also returns the x-amz-tagging-count header that provides -// the count of number of tags associated with the object. You can use GetObjectTagging -// (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) +// Assuming you have the relevant permission to read object tags, the response +// also returns the x-amz-tagging-count header that provides the count of number +// of tags associated with the object. You can use GetObjectTagging (https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObjectTagging.html) // to retrieve the tag set associated with an object. // // Permissions // -// You need the s3:GetObject permission for this operation. For more information, -// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). +// You need the relevant read object (or version) permission for this operation. +// For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). // If the object you request does not exist, the error Amazon S3 returns depends // on whether you also have the s3:ListBucket permission. // @@ -5482,8 +5481,8 @@ func (c *S3) HeadObjectRequest(input *HeadObjectInput) (req *request.Request, ou // // Permissions // -// You need the s3:GetObject permission for this operation. For more information, -// see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). +// You need the relevant read object (or version) permission for this operation. +// For more information, see Specifying Permissions in a Policy (https://docs.aws.amazon.com/AmazonS3/latest/dev/using-with-s3-actions.html). // If the object you request does not exist, the error Amazon S3 returns depends // on whether you also have the s3:ListBucket permission. // @@ -15715,7 +15714,8 @@ type DeleteObjectInput struct { Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` // Indicates whether S3 Object Lock should bypass Governance-mode restrictions - // to process this operation. + // to process this operation. To use this header, you must have the s3:PutBucketPublicAccessBlock + // permission. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` // The account ID of the expected bucket owner. If the bucket is owned by a @@ -16072,8 +16072,8 @@ type DeleteObjectsInput struct { Bucket *string `location:"uri" locationName:"Bucket" type:"string" required:"true"` // Specifies whether you want to delete this object even if it has a Governance-type - // Object Lock in place. You must have sufficient permissions to perform this - // operation. + // Object Lock in place. To use this header, you must have the s3:PutBucketPublicAccessBlock + // permission. BypassGovernanceRetention *bool `location:"header" locationName:"x-amz-bypass-governance-retention" type:"boolean"` // Container for the request. diff --git a/service/s3/examples_test.go b/service/s3/examples_test.go index 27b304d5fee..99a7251630b 100644 --- a/service/s3/examples_test.go +++ b/service/s3/examples_test.go @@ -128,13 +128,17 @@ func ExampleS3_CopyObject_shared00() { fmt.Println(result) } -// To create a bucket +// To create a bucket in a specific region // -// The following example creates a bucket. +// The following example creates a bucket. The request specifies an AWS region where +// to create the bucket. func ExampleS3_CreateBucket_shared00() { svc := s3.New(session.New()) input := &s3.CreateBucketInput{ Bucket: aws.String("examplebucket"), + CreateBucketConfiguration: &s3.CreateBucketConfiguration{ + LocationConstraint: aws.String("eu-west-1"), + }, } result, err := svc.CreateBucket(input) @@ -159,17 +163,13 @@ func ExampleS3_CreateBucket_shared00() { fmt.Println(result) } -// To create a bucket in a specific region +// To create a bucket // -// The following example creates a bucket. The request specifies an AWS region where -// to create the bucket. +// The following example creates a bucket. func ExampleS3_CreateBucket_shared01() { svc := s3.New(session.New()) input := &s3.CreateBucketInput{ Bucket: aws.String("examplebucket"), - CreateBucketConfiguration: &s3.CreateBucketConfiguration{ - LocationConstraint: aws.String("eu-west-1"), - }, } result, err := svc.CreateBucket(input) @@ -467,16 +467,16 @@ func ExampleS3_DeleteObject_shared01() { fmt.Println(result) } -// To remove tag set from an object +// To remove tag set from an object version // -// The following example removes tag set associated with the specified object. If the -// bucket is versioning enabled, the operation removes tag set from the latest object -// version. +// The following example removes tag set associated with the specified object version. +// The request specifies both the object key and object version. func ExampleS3_DeleteObjectTagging_shared00() { svc := s3.New(session.New()) input := &s3.DeleteObjectTaggingInput{ - Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), + Bucket: aws.String("examplebucket"), + Key: aws.String("HappyFace.jpg"), + VersionId: aws.String("ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"), } result, err := svc.DeleteObjectTagging(input) @@ -497,16 +497,16 @@ func ExampleS3_DeleteObjectTagging_shared00() { fmt.Println(result) } -// To remove tag set from an object version +// To remove tag set from an object // -// The following example removes tag set associated with the specified object version. -// The request specifies both the object key and object version. +// The following example removes tag set associated with the specified object. If the +// bucket is versioning enabled, the operation removes tag set from the latest object +// version. func ExampleS3_DeleteObjectTagging_shared01() { svc := s3.New(session.New()) input := &s3.DeleteObjectTaggingInput{ - Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), - VersionId: aws.String("ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"), + Bucket: aws.String("examplebucket"), + Key: aws.String("HappyFace.jpg"), } result, err := svc.DeleteObjectTagging(input) @@ -527,11 +527,11 @@ func ExampleS3_DeleteObjectTagging_shared01() { fmt.Println(result) } -// To delete multiple objects from a versioned bucket +// To delete multiple object versions from a versioned bucket // -// The following example deletes objects from a bucket. The bucket is versioned, and -// the request does not specify the object version to delete. In this case, all versions -// remain in the bucket and S3 adds a delete marker. +// The following example deletes objects from a bucket. The request specifies object +// versions. S3 deletes specific object versions and returns the key and versions of +// deleted objects in the response. func ExampleS3_DeleteObjects_shared00() { svc := s3.New(session.New()) input := &s3.DeleteObjectsInput{ @@ -539,10 +539,12 @@ func ExampleS3_DeleteObjects_shared00() { Delete: &s3.Delete{ Objects: []*s3.ObjectIdentifier{ { - Key: aws.String("objectkey1"), + Key: aws.String("HappyFace.jpg"), + VersionId: aws.String("2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"), }, { - Key: aws.String("objectkey2"), + Key: aws.String("HappyFace.jpg"), + VersionId: aws.String("yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"), }, }, Quiet: aws.Bool(false), @@ -567,11 +569,11 @@ func ExampleS3_DeleteObjects_shared00() { fmt.Println(result) } -// To delete multiple object versions from a versioned bucket +// To delete multiple objects from a versioned bucket // -// The following example deletes objects from a bucket. The request specifies object -// versions. S3 deletes specific object versions and returns the key and versions of -// deleted objects in the response. +// The following example deletes objects from a bucket. The bucket is versioned, and +// the request does not specify the object version to delete. In this case, all versions +// remain in the bucket and S3 adds a delete marker. func ExampleS3_DeleteObjects_shared01() { svc := s3.New(session.New()) input := &s3.DeleteObjectsInput{ @@ -579,12 +581,10 @@ func ExampleS3_DeleteObjects_shared01() { Delete: &s3.Delete{ Objects: []*s3.ObjectIdentifier{ { - Key: aws.String("HappyFace.jpg"), - VersionId: aws.String("2LWg7lQLnY41.maGB5Z6SWW.dcq0vx7b"), + Key: aws.String("objectkey1"), }, { - Key: aws.String("HappyFace.jpg"), - VersionId: aws.String("yoz3HB.ZhCS_tKVEmIOr7qYyyAaZSKVd"), + Key: aws.String("objectkey2"), }, }, Quiet: aws.Bool(false), @@ -1030,16 +1030,14 @@ func ExampleS3_GetObjectAcl_shared00() { fmt.Println(result) } -// To retrieve tag set of a specific object version +// To retrieve tag set of an object // -// The following example retrieves tag set of an object. The request specifies object -// version. +// The following example retrieves tag set of an object. func ExampleS3_GetObjectTagging_shared00() { svc := s3.New(session.New()) input := &s3.GetObjectTaggingInput{ - Bucket: aws.String("examplebucket"), - Key: aws.String("exampleobject"), - VersionId: aws.String("ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"), + Bucket: aws.String("examplebucket"), + Key: aws.String("HappyFace.jpg"), } result, err := svc.GetObjectTagging(input) @@ -1060,14 +1058,16 @@ func ExampleS3_GetObjectTagging_shared00() { fmt.Println(result) } -// To retrieve tag set of an object +// To retrieve tag set of a specific object version // -// The following example retrieves tag set of an object. +// The following example retrieves tag set of an object. The request specifies object +// version. func ExampleS3_GetObjectTagging_shared01() { svc := s3.New(session.New()) input := &s3.GetObjectTaggingInput{ - Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), + Bucket: aws.String("examplebucket"), + Key: aws.String("exampleobject"), + VersionId: aws.String("ydlaNkwWm0SfKJR.T1b1fIdPRbldTYRI"), } result, err := svc.GetObjectTagging(input) @@ -1201,13 +1201,17 @@ func ExampleS3_ListBuckets_shared00() { fmt.Println(result) } -// To list in-progress multipart uploads on a bucket +// List next set of multipart uploads when previous result is truncated // -// The following example lists in-progress multipart uploads on a specific bucket. +// The following example specifies the upload-id-marker and key-marker from previous +// truncated response to retrieve next setup of multipart uploads. func ExampleS3_ListMultipartUploads_shared00() { svc := s3.New(session.New()) input := &s3.ListMultipartUploadsInput{ - Bucket: aws.String("examplebucket"), + Bucket: aws.String("examplebucket"), + KeyMarker: aws.String("nextkeyfrompreviousresponse"), + MaxUploads: aws.Int64(2), + UploadIdMarker: aws.String("valuefrompreviousresponse"), } result, err := svc.ListMultipartUploads(input) @@ -1228,17 +1232,13 @@ func ExampleS3_ListMultipartUploads_shared00() { fmt.Println(result) } -// List next set of multipart uploads when previous result is truncated +// To list in-progress multipart uploads on a bucket // -// The following example specifies the upload-id-marker and key-marker from previous -// truncated response to retrieve next setup of multipart uploads. +// The following example lists in-progress multipart uploads on a specific bucket. func ExampleS3_ListMultipartUploads_shared01() { svc := s3.New(session.New()) input := &s3.ListMultipartUploadsInput{ - Bucket: aws.String("examplebucket"), - KeyMarker: aws.String("nextkeyfrompreviousresponse"), - MaxUploads: aws.Int64(2), - UploadIdMarker: aws.String("valuefrompreviousresponse"), + Bucket: aws.String("examplebucket"), } result, err := svc.ListMultipartUploads(input) @@ -1808,16 +1808,18 @@ func ExampleS3_PutBucketWebsite_shared00() { fmt.Println(result) } -// To create an object. +// To upload an object (specify optional headers) // -// The following example creates an object. If the bucket is versioning enabled, S3 -// returns version ID in response. +// The following example uploads an object. The request specifies optional request headers +// to directs S3 to use specific storage class and use server-side encryption. func ExampleS3_PutObject_shared00() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), - Bucket: aws.String("examplebucket"), - Key: aws.String("objectkey"), + Body: aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")), + Bucket: aws.String("examplebucket"), + Key: aws.String("HappyFace.jpg"), + ServerSideEncryption: aws.String("AES256"), + StorageClass: aws.String("STANDARD_IA"), } result, err := svc.PutObject(input) @@ -1838,17 +1840,19 @@ func ExampleS3_PutObject_shared00() { fmt.Println(result) } -// To upload an object and specify optional tags +// To upload an object and specify server-side encryption and object tags // -// The following example uploads an object. The request specifies optional object tags. -// The bucket is versioned, therefore S3 returns version ID of the newly created object. +// The following example uploads and object. The request specifies the optional server-side +// encryption option. The request also specifies optional object tags. If the bucket +// is versioning enabled, S3 returns version ID in response. func ExampleS3_PutObject_shared01() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("c:\\HappyFace.jpg")), - Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), - Tagging: aws.String("key1=value1&key2=value2"), + Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), + Bucket: aws.String("examplebucket"), + Key: aws.String("exampleobject"), + ServerSideEncryption: aws.String("AES256"), + Tagging: aws.String("key1=value1&key2=value2"), } result, err := svc.PutObject(input) @@ -1869,17 +1873,16 @@ func ExampleS3_PutObject_shared01() { fmt.Println(result) } -// To upload an object +// To create an object. // -// The following example uploads an object to a versioning-enabled bucket. The source -// file is specified using Windows file syntax. S3 returns VersionId of the newly created -// object. +// The following example creates an object. If the bucket is versioning enabled, S3 +// returns version ID in response. func ExampleS3_PutObject_shared02() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")), + Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), + Key: aws.String("objectkey"), } result, err := svc.PutObject(input) @@ -1900,18 +1903,20 @@ func ExampleS3_PutObject_shared02() { fmt.Println(result) } -// To upload an object (specify optional headers) +// To upload object and specify user-defined metadata // -// The following example uploads an object. The request specifies optional request headers -// to directs S3 to use specific storage class and use server-side encryption. +// The following example creates an object. The request also specifies optional metadata. +// If the bucket is versioning enabled, S3 returns version ID in response. func ExampleS3_PutObject_shared03() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")), - Bucket: aws.String("examplebucket"), - Key: aws.String("HappyFace.jpg"), - ServerSideEncryption: aws.String("AES256"), - StorageClass: aws.String("STANDARD_IA"), + Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), + Bucket: aws.String("examplebucket"), + Key: aws.String("exampleobject"), + Metadata: map[string]*string{ + "metadata1": aws.String("value1"), + "metadata2": aws.String("value2"), + }, } result, err := svc.PutObject(input) @@ -1932,19 +1937,18 @@ func ExampleS3_PutObject_shared03() { fmt.Println(result) } -// To upload an object and specify server-side encryption and object tags +// To upload an object and specify canned ACL. // -// The following example uploads and object. The request specifies the optional server-side -// encryption option. The request also specifies optional object tags. If the bucket -// is versioning enabled, S3 returns version ID in response. +// The following example uploads and object. The request specifies optional canned ACL +// (access control list) to all READ access to authenticated users. If the bucket is +// versioning enabled, S3 returns version ID in response. func ExampleS3_PutObject_shared04() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), - Bucket: aws.String("examplebucket"), - Key: aws.String("exampleobject"), - ServerSideEncryption: aws.String("AES256"), - Tagging: aws.String("key1=value1&key2=value2"), + ACL: aws.String("authenticated-read"), + Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), + Bucket: aws.String("examplebucket"), + Key: aws.String("exampleobject"), } result, err := svc.PutObject(input) @@ -1965,18 +1969,17 @@ func ExampleS3_PutObject_shared04() { fmt.Println(result) } -// To upload an object and specify canned ACL. +// To upload an object // -// The following example uploads and object. The request specifies optional canned ACL -// (access control list) to all READ access to authenticated users. If the bucket is -// versioning enabled, S3 returns version ID in response. +// The following example uploads an object to a versioning-enabled bucket. The source +// file is specified using Windows file syntax. S3 returns VersionId of the newly created +// object. func ExampleS3_PutObject_shared05() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - ACL: aws.String("authenticated-read"), - Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), + Body: aws.ReadSeekCloser(strings.NewReader("HappyFace.jpg")), Bucket: aws.String("examplebucket"), - Key: aws.String("exampleobject"), + Key: aws.String("HappyFace.jpg"), } result, err := svc.PutObject(input) @@ -1997,20 +2000,17 @@ func ExampleS3_PutObject_shared05() { fmt.Println(result) } -// To upload object and specify user-defined metadata +// To upload an object and specify optional tags // -// The following example creates an object. The request also specifies optional metadata. -// If the bucket is versioning enabled, S3 returns version ID in response. +// The following example uploads an object. The request specifies optional object tags. +// The bucket is versioned, therefore S3 returns version ID of the newly created object. func ExampleS3_PutObject_shared06() { svc := s3.New(session.New()) input := &s3.PutObjectInput{ - Body: aws.ReadSeekCloser(strings.NewReader("filetoupload")), - Bucket: aws.String("examplebucket"), - Key: aws.String("exampleobject"), - Metadata: map[string]*string{ - "metadata1": aws.String("value1"), - "metadata2": aws.String("value2"), - }, + Body: aws.ReadSeekCloser(strings.NewReader("c:\\HappyFace.jpg")), + Bucket: aws.String("examplebucket"), + Key: aws.String("HappyFace.jpg"), + Tagging: aws.String("key1=value1&key2=value2"), } result, err := svc.PutObject(input) @@ -2175,18 +2175,19 @@ func ExampleS3_UploadPart_shared00() { fmt.Println(result) } -// To upload a part by copying data from an existing object as data source +// To upload a part by copying byte range from an existing object as data source // -// The following example uploads a part of a multipart upload by copying data from an -// existing object as data source. +// The following example uploads a part of a multipart upload by copying a specified +// byte range from an existing object as data source. func ExampleS3_UploadPartCopy_shared00() { svc := s3.New(session.New()) input := &s3.UploadPartCopyInput{ - Bucket: aws.String("examplebucket"), - CopySource: aws.String("/bucketname/sourceobjectkey"), - Key: aws.String("examplelargeobject"), - PartNumber: aws.Int64(1), - UploadId: aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"), + Bucket: aws.String("examplebucket"), + CopySource: aws.String("/bucketname/sourceobjectkey"), + CopySourceRange: aws.String("bytes=1-100000"), + Key: aws.String("examplelargeobject"), + PartNumber: aws.Int64(2), + UploadId: aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"), } result, err := svc.UploadPartCopy(input) @@ -2207,19 +2208,18 @@ func ExampleS3_UploadPartCopy_shared00() { fmt.Println(result) } -// To upload a part by copying byte range from an existing object as data source +// To upload a part by copying data from an existing object as data source // -// The following example uploads a part of a multipart upload by copying a specified -// byte range from an existing object as data source. +// The following example uploads a part of a multipart upload by copying data from an +// existing object as data source. func ExampleS3_UploadPartCopy_shared01() { svc := s3.New(session.New()) input := &s3.UploadPartCopyInput{ - Bucket: aws.String("examplebucket"), - CopySource: aws.String("/bucketname/sourceobjectkey"), - CopySourceRange: aws.String("bytes=1-100000"), - Key: aws.String("examplelargeobject"), - PartNumber: aws.Int64(2), - UploadId: aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"), + Bucket: aws.String("examplebucket"), + CopySource: aws.String("/bucketname/sourceobjectkey"), + Key: aws.String("examplelargeobject"), + PartNumber: aws.Int64(1), + UploadId: aws.String("exampleuoh_10OhKhT7YukE9bjzTPRiuaCotmZM_pFngJFir9OZNrSr5cWa3cq3LZSUsfjI4FI7PkP91We7Nrw--"), } result, err := svc.UploadPartCopy(input)