CreateAccessPoint

CreateAccessPoint #

Overview #

Creates an access point and associates it with the specified bucket.

AWS API Reference: https://docs.aws.amazon.com/AmazonS3/latest/API/API_control_CreateAccessPoint.html

Method #

CREATEACCESSPOINT

Import Parameters #

The request uses the following import parameters.

  • i_bucket_name (bucket in AWS) (Required)

    Name of the bucket to create.

  • i_region (Required)

    AWS Region of the Amazon S3 Bucket.

  • i_key (Key in AWS) (Required)

    The key of the destination object.

  • i_x_amz_acl(x-amz-acl in AWS)

    The canned ACL to apply to the object.

  • i_cachecontrol()

  • i_contentdisposition (Content-Disposition in AWS)

    Specifies presentational information for the object.

  • i_contentlanguage ()

  • i_contenttype (Content-Type in AWS)

    A standard MIME type describing the format of the object data.

  • i_Expires (Expires in AWS)

    The date and time at which the object is no longer cacheable.

  • i_x_amz_copy_source (x-amz-copy-source in AWS)

    Specifies the source object for the copy operation.

  • i_x_amz_copy_source_if_match (x-amz-copy-source-if-match in AWS)

    Copies the object if its entity tag (ETag) matches the specified tag.

  • i_x_amz_copy_source_if_mod_sin (x-amz-copy-source-if-modified-since in AWS)

    Copies the object if it has been modified since the specified time.

  • i_x_amz_copy_source_if_no_matc (x-amz-copy-source-if-none-match in AWS)

    Copies the object if its entity tag (ETag) is different than the specified ETag.

  • i_x_amz_copy_source_if_unm_sin (x-amz-copy-source-if-unmodified-since in AWS)

    Copies the object if it hasn’t been modified since the specified time.

  • i_x_amz_copy_source_ss_enc_cua (x-amz-copy-source-server-side-encryption-customer-algorithm in AWS)

    Specifies the algorithm to use when decrypting the source object (for example, AES256).

  • i_x_amz_copy_source_ss_enc_cky (x-amz-copy-source-server-side-encryption-customer-key in AWS)

    Specifies the customer-provided encryption key for Amazon S3 to use to decrypt the source object.

  • i_x_amz_copy_source_ss_enc_md5 (x-amz-copy-source-server-side-encryption-customer-key-MD5 in AWS)

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.

  • i_x_amz_grant_full_control (x-amz-grant-full-control in AWS)

    Gives the grantee READ, READ_ACP, and WRITE_ACP permissions on the object.

  • i_x_amz_grant_read (x-amz-grant-read in AWS)

    Allows grantee to read the object data and its metadata.

  • i_x_amz_grant_read_acp (x-amz-grant-read-acp in AWS)

    Allows grantee to read the object ACL.

  • i_x_amz_grant_write_acp (x-amz-grant-write-acp in AWS)

    Allows grantee to write the ACL for the applicable object.

  • i_x_amz_metadata_directive (x-amz-metadata-directive in AWS)

    Specifies whether the metadata is copied from the source object or replaced with metadata provided in the request.

  • i_x_amz_object_lock_legal_hold (x-amz-object-lock-legal-hold in AWS)

    Specifies whether you want to apply a Legal Hold to the copied object.

  • i_x_amz_object_lock_mode (x-amz-object-lock-mode in AWS)

    The Object Lock mode that you want to apply to the copied object.

  • i_x_amz_object_lock_retain_unt (x-amz-object-lock-retain-until-date in AWS)

    The date and time when you want the copied object’s Object Lock to expire.

  • i_x_amz_request_payer (x-amz-request-payer in AWS)

    Confirms that the requester knows that they will be charged for the request.

  • i_x_amz_server_side_encryption (x-amz-server-side-encryption in AWS)

    The server-side encryption algorithm used when storing this object in Amazon S3 (for example, AES256, aws:kms).

  • i_x_amz_server_side_kms_key_id (x-amz-server-side-encryption-aws-kms-key-id in AWS)

    Specifies the AWS KMS key ID to use for object encryption.

  • i_x_amz_server_side_enc_contect (x-amz-server-side-encryption-context in AWS)

    Specifies the AWS KMS Encryption Context to use for object encryption.

  • i_x_amz_server_custom_algorit (x-amz-server-side-encryption-customer-algorithm in AWS)

    Specifies the algorithm to use to when encrypting the object (for example, AES256).

  • i_x_amz_server_custom_key (x-amz-server-side-encryption-customer-key in AWS)

    Specifies the customer-provided encryption key for Amazon S3 to use in encrypting data.

  • i_x_amz_server_custom_key_md5 (x-amz-server-side-encryption-customer-key-MD5 in AWS)

    Specifies the 128-bit MD5 digest of the encryption key according to RFC 1321.

  • i_x_amz_storage_class (x-amz-storage-class in AWS)

    By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects.

  • i_x_amz_tagging (x-amz-tagging in AWS)

    The tag-set for the object destination object this value must be used in conjunction with the TaggingDirective.

  • i_x_amz_tagging_directive (x-amz-tagging-directive in AWS)

    Specifies whether the object tag-set are copied from the source object or replaced with tag-set provided in the request.

  • i_x_amz_website_redirect_locat (x-amz-website-redirect-location in AWS)

    If the bucket is configured as a website, redirects requests for this object to another object in the same bucket or to an external URL.

  • i_x_amz_expected_b_owner (x-amz-expected-bucket-owner in AWS)

    The account id of the expected destination bucket owner.

  • i_x_amz_source_exp_b_own(x-amz-source-expected-bucket-owner in AWS)

    The account id of the expected source bucket owner.


Export Parameters #

This method use the following export parameters:

  • e_http_status

    HTTP Status code.

  • e_response_headers

    Returns information about the request in format Name/Value pair values.

  • e_response_content

    Response content in string format.


Example #

DATA: lo_s3               TYPE REF TO /lnkc/cl_sdk_aws_s3,
      lv_http_status      TYPE i,
      lt_response_headers TYPE tihttpnvp,
      lv_response_content TYPE string.

  TRY.
      CREATE OBJECT lo_s3
        EXPORTING
          i_user_name         = 'user_awsconnector'
          i_access_key        = 'acces_key_value'
          i_secret_access_key = 'secret_acceskey_value'.
  ENDTRY.


  TRY.
      CALL METHOD lo_s3->copyobject
        EXPORTING
          i_bucket_name                  = 'i_bucket_name'
          i_region                       = 'i_region'
          i_key                          = 'i_key'
*         i_x_amz_acl                    =
*         i_cachecontrol                 =
*         i_contentdisposition           =
*         i_contentencoding              =
*         i_contentlanguage              =
*         i_contenttype                  =
*         i_expires                      =
          i_x_amz_copy_source            = 
*         i_x_amz_copy_source_if_match   =
*         i_x_amz_copy_source_if_mod_sin =
*         i_x_amz_copy_source_if_no_matc =
*         i_x_amz_copy_source_if_unm_sin =
*         i_x_amz_copy_source_ss_enc_cua =
*         i_x_amz_copy_source_ss_enc_cky =
*         i_x_amz_copy_source_ss_enc_md5 =
*         i_x_amz_grant_full_control     =
*         i_x_amz_grant_read  =
*         i_x_amz_grant_read_acp         =
*         i_x_amz_grant_write_acp        =
*         i_x_amz_metadata_directive     =
*         i_x_amz_object_lock_legal_hold =
*         i_x_amz_object_lock_mode       =
*         i_x_amz_object_lock_retain_unt =
*         i_x_amz_request_payer          =
*         i_x_amz_server_side_encryption =
*         i_x_amz_server_side_kms_key_id =
*         i_x_amz_server_side_enc_contex =
*         i_x_amz_server_custom_algorit  =
*         i_x_amz_server_custom_key      =
*         i_x_amz_server_custom_key_md5  =
*         i_x_amz_storage_class          = 
*         i_x_amz_tagging                =
*         i_x_amz_tagging_directive      =
*         i_x_amz_website_redirect_locat =
*         i_x_amz_expected_b_owner       =
*         i_x_amz_source_exp_b_own       =
        IMPORTING
          e_http_status                  = lv_http_status
          e_response_headers             = lt_response_headers
          e_response_content             = lv_response_content.
      CATCH /lnkc/cx_sdk_aws .
        " Error Message
  ENDTRY.