com.amazonaws.services.s3.model

## クラス SetBucketPolicyRequest

- java.lang.Object
- - com.amazonaws.AmazonWebServiceRequest
  - - com.amazonaws.services.s3.model.SetBucketPolicyRequest

-     public class SetBucketPolicyRequest
      extends AmazonWebServiceRequest

  Sets the policy associated with the specified bucket. Only the owner of the bucket can set a bucket policy. If a policy already exists for the specified bucket, the new policy replaces the existing policy.

  Bucket policies provide access control management at the bucket level for both the bucket resource and contained object resources. Only one policy can be specified per-bucket.

  See the Amazon S3 developer guide for more information on forming bucket polices.

  関連項目:
    `AmazonS3.setBucketPolicy(SetBucketPolicyRequest)`

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `SetBucketPolicyRequest(java.lang.String bucketName, java.lang.String policyText)` Creates a new request object, ready to be executed to set an Amazon S3 bucket's policy.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getBucketName()` Returns the name of the Amazon S3 bucket whose policy is being set.
    `java.lang.String` | `getPolicyText()` Returns the policy to apply to the specified bucket.
    `void` | `setBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket whose policy is being set.
    `void` | `setPolicyText(java.lang.String policyText)` Sets the policy to apply to the specified bucket.
    `SetBucketPolicyRequest` | `withBucketName(java.lang.String bucketName)` Sets the name of the Amazon S3 bucket whose policy is being set, and returns the updated request object so that additional method calls can be chained together.
    `SetBucketPolicyRequest` | `withPolicyText(java.lang.String policyText)` Sets the policy to apply to the specified bucket, and returns the updated request object so that additional method calls can be chained together.

    - ### クラスから継承されたメソッド com.amazonaws.AmazonWebServiceRequest

      `copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, setRequestCredentials`

    - ### クラスから継承されたメソッド java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### SetBucketPolicyRequest

          public SetBucketPolicyRequest(java.lang.String bucketName,
                                java.lang.String policyText)

      Creates a new request object, ready to be executed to set an Amazon S3 bucket's policy.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket whose policy is being set.
        `policyText` - The policy to apply to the specified bucket.

  - ### メソッドの詳細

    - #### getBucketName

          public java.lang.String getBucketName()

      Returns the name of the Amazon S3 bucket whose policy is being set.
      戻り値:
        The name of the Amazon S3 bucket whose policy is being set.

    - #### setBucketName

          public void setBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket whose policy is being set.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket whose policy is being set.

    - #### withBucketName

          public SetBucketPolicyRequest withBucketName(java.lang.String bucketName)

      Sets the name of the Amazon S3 bucket whose policy is being set, and returns the updated request object so that additional method calls can be chained together.
      パラメータ:
        `bucketName` - The name of the Amazon S3 bucket whose policy is being set.
      戻り値:
        The updated request object so that additional method calls can be chained together.

    - #### getPolicyText

          public java.lang.String getPolicyText()

      Returns the policy to apply to the specified bucket.
      戻り値:
        The policy to apply to the specified bucket.

    - #### setPolicyText

          public void setPolicyText(java.lang.String policyText)

      Sets the policy to apply to the specified bucket.
      パラメータ:
        `policyText` - The policy to apply to the specified bucket.

    - #### withPolicyText

          public SetBucketPolicyRequest withPolicyText(java.lang.String policyText)

      Sets the policy to apply to the specified bucket, and returns the updated request object so that additional method calls can be chained together.
      パラメータ:
        `policyText` - The policy to apply to the specified bucket.
      戻り値:
        The updated request object, so that additional method calls can be chained together.