Skip to content

/AWS1/CL_FSX=>CREATEANDATTACHS3ACCESSPOINT()

About CreateAndAttachS3AccessPoint

Creates an S3 access point and attaches it to an Amazon FSx volume. For FSx for OpenZFS file systems, the volume must be hosted on a high-availability file system, either Single-AZ or Multi-AZ. For more information, see Accessing your data using access points in the Amazon FSx for OpenZFS User Guide.

The requester requires the following permissions to perform these actions:

  • fsx:CreateAndAttachS3AccessPoint

  • s3:CreateAccessPoint

  • s3:GetAccessPoint

  • s3:PutAccessPointPolicy

  • s3:DeleteAccessPoint

The following actions are related to CreateAndAttachS3AccessPoint:

Method Signature

IMPORTING

Required arguments:

iv_name TYPE /AWS1/FSXS3ACCPTATTACHMENTNAME /AWS1/FSXS3ACCPTATTACHMENTNAME

The name you want to assign to this S3 access point.

iv_type TYPE /AWS1/FSXS3ACCPTATTACHMENTTYPE /AWS1/FSXS3ACCPTATTACHMENTTYPE

The type of S3 access point you want to create. Only OpenZFS is supported.

Optional arguments:

iv_clientrequesttoken TYPE /AWS1/FSXCLIENTREQUESTTOKEN /AWS1/FSXCLIENTREQUESTTOKEN

ClientRequestToken

io_openzfsconfiguration TYPE REF TO /AWS1/CL_FSXCREANDATTACHS3AC01 /AWS1/CL_FSXCREANDATTACHS3AC01

Specifies the configuration to use when creating and attaching an S3 access point to an FSx for OpenZFS volume.

io_s3accesspoint TYPE REF TO /AWS1/CL_FSXCREANDATTACHS3AC02 /AWS1/CL_FSXCREANDATTACHS3AC02

Specifies the virtual private cloud (VPC) configuration if you're creating an access point that is restricted to a VPC. For more information, see Creating access points restricted to a virtual private cloud.

RETURNING

oo_output TYPE REF TO /aws1/cl_fsxcreandattachs3ac03 /AWS1/CL_FSXCREANDATTACHS3AC03

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_fsx~createandattachs3accesspoint(
  io_openzfsconfiguration = new /aws1/cl_fsxcreandattachs3ac01(
    io_filesystemidentity = new /aws1/cl_fsxopenzfsfilesyste01(
      io_posixuser = new /aws1/cl_fsxopenzfsposixfile00(
        it_secondarygids = VALUE /aws1/cl_fsxfilesystemsecgid00=>tt_filesystemsecondarygids(
          ( new /aws1/cl_fsxfilesystemsecgid00( 123 ) )
        )
        iv_gid = 123
        iv_uid = 123
      )
      iv_type = |string|
    )
    iv_volumeid = |string|
  )
  io_s3accesspoint = new /aws1/cl_fsxcreandattachs3ac02(
    io_vpcconfiguration = new /aws1/cl_fsxs3accpointvpcconf( |string| )
    iv_policy = |string|
  )
  iv_clientrequesttoken = |string|
  iv_name = |string|
  iv_type = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_s3accesspointattachment = lo_result->get_s3accesspointattachment( ).
  IF lo_s3accesspointattachment IS NOT INITIAL.
    lv_s3accesspointattachment_1 = lo_s3accesspointattachment->get_lifecycle( ).
    lo_lifecycletransitionreas = lo_s3accesspointattachment->get_lifecycletransreason( ).
    IF lo_lifecycletransitionreas IS NOT INITIAL.
      lv_errormessage = lo_lifecycletransitionreas->get_message( ).
    ENDIF.
    lv_creationtime = lo_s3accesspointattachment->get_creationtime( ).
    lv_s3accesspointattachment_2 = lo_s3accesspointattachment->get_name( ).
    lv_s3accesspointattachment_3 = lo_s3accesspointattachment->get_type( ).
    lo_s3accesspointopenzfscon = lo_s3accesspointattachment->get_openzfsconfiguration( ).
    IF lo_s3accesspointopenzfscon IS NOT INITIAL.
      lv_volumeid = lo_s3accesspointopenzfscon->get_volumeid( ).
      lo_openzfsfilesystemidenti = lo_s3accesspointopenzfscon->get_filesystemidentity( ).
      IF lo_openzfsfilesystemidenti IS NOT INITIAL.
        lv_openzfsfilesystemuserty = lo_openzfsfilesystemidenti->get_type( ).
        lo_openzfsposixfilesystemu = lo_openzfsfilesystemidenti->get_posixuser( ).
        IF lo_openzfsposixfilesystemu IS NOT INITIAL.
          lv_filesystemuid = lo_openzfsposixfilesystemu->get_uid( ).
          lv_filesystemgid = lo_openzfsposixfilesystemu->get_gid( ).
          LOOP AT lo_openzfsposixfilesystemu->get_secondarygids( ) into lo_row.
            lo_row_1 = lo_row.
            IF lo_row_1 IS NOT INITIAL.
              lv_filesystemgid = lo_row_1->get_value( ).
            ENDIF.
          ENDLOOP.
        ENDIF.
      ENDIF.
    ENDIF.
    lo_s3accesspoint = lo_s3accesspointattachment->get_s3accesspoint( ).
    IF lo_s3accesspoint IS NOT INITIAL.
      lv_generalarn = lo_s3accesspoint->get_resourcearn( ).
      lv_s3accesspointalias = lo_s3accesspoint->get_alias( ).
      lo_s3accesspointvpcconfigu = lo_s3accesspoint->get_vpcconfiguration( ).
      IF lo_s3accesspointvpcconfigu IS NOT INITIAL.
        lv_vpcid = lo_s3accesspointvpcconfigu->get_vpcid( ).
      ENDIF.
    ENDIF.
  ENDIF.
ENDIF.