PutBucketReplication #

Overview #

Creates a replication configuration or replaces an existing one.

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

Method #


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_x_amz_bucket_obj_lock_token (x-amz-bucket-object-lock-token in AWS)

    Object Lock Token.

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

    The account id of the expected bucket owner.

  • i_replicationconfiguration (ReplicationConfiguration in AWS) (Required)

    Root level tag for the ReplicationConfiguration parameters (Required)

  • i_role(Role in AWS)

    The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that Amazon S3 assumes when replicating objects.

  • i_rule(Rule in AWS) (Required)

    A container for one or more replication rules

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,
      lS_role             type string,
      lt_rule             TYPE /lnkc/aws_s3_t_rule,
      ls_repliconfig      type string.

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


    CALL METHOD lo_s3->putbucketreplication
        i_bucket_name                 = 'i_region_name'
        i_region                      = 'region' " example eu-west-1
        i_x_amz_bucket_obj_lock_token = 'x_amz_bucket_obj_lock_token' 
        i_x_amz_expected_b_owner      = 'x_amz_expected_owner'
        i_replicationconfiguration    = ls_replicationconfiguration
        i_role                        = ls_role
        i_rule                        = lt_rule
        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