Skip to content

/AWS1/IF_DSY=>CREATELOCATIONFSXWINDOWS()

About CreateLocationFsxWindows

Creates a transfer location for an Amazon FSx for Windows File Server file system. DataSync can use this location as a source or destination for transferring data.

Before you begin, make sure that you understand how DataSync accesses FSx for Windows File Server file systems.

Method Signature

METHODS /AWS1/IF_DSY~CREATELOCATIONFSXWINDOWS
  IMPORTING
    !IV_SUBDIRECTORY TYPE /AWS1/DSYFSXWINDOWSSUBDIRECT00 OPTIONAL
    !IV_FSXFILESYSTEMARN TYPE /AWS1/DSYFSXFILESYSTEMARN OPTIONAL
    !IT_SECURITYGROUPARNS TYPE /AWS1/CL_DSYEC2SECGRPARNLIST_W=>TT_EC2SECURITYGROUPARNLIST OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_DSYTAGLISTENTRY=>TT_INPUTTAGLIST OPTIONAL
    !IV_USER TYPE /AWS1/DSYSMBUSER OPTIONAL
    !IV_DOMAIN TYPE /AWS1/DSYSMBDOMAIN OPTIONAL
    !IV_PASSWORD TYPE /AWS1/DSYSMBPASSWORD OPTIONAL
    !IO_CMKSECRETCONFIG TYPE REF TO /AWS1/CL_DSYCMKSECRETCONFIG OPTIONAL
    !IO_CUSTOMSECRETCONFIG TYPE REF TO /AWS1/CL_DSYCUSTOMSECRETCONFIG OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dsycrelocfsxwindows01
  RAISING
    /AWS1/CX_DSYINTERNALEXCEPTION
    /AWS1/CX_DSYINVALIDREQUESTEX
    /AWS1/CX_DSYCLIENTEXC
    /AWS1/CX_DSYSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_fsxfilesystemarn TYPE /AWS1/DSYFSXFILESYSTEMARN /AWS1/DSYFSXFILESYSTEMARN

Specifies the Amazon Resource Name (ARN) for the FSx for Windows File Server file system.

it_securitygrouparns TYPE /AWS1/CL_DSYEC2SECGRPARNLIST_W=>TT_EC2SECURITYGROUPARNLIST TT_EC2SECURITYGROUPARNLIST

Specifies the ARNs of the Amazon EC2 security groups that provide access to your file system's preferred subnet.

The security groups that you specify must be able to communicate with your file system's security groups. For information about configuring security groups for file system access, see the Amazon FSx for Windows File Server User Guide .

If you choose a security group that doesn't allow connections from within itself, do one of the following:

  • Configure the security group to allow it to communicate within itself.

  • Choose a different security group that can communicate with the mount target's security group.

iv_user TYPE /AWS1/DSYSMBUSER /AWS1/DSYSMBUSER

Specifies the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

For information about choosing a user with the right level of access for your transfer, see required permissions for FSx for Windows File Server locations.

Optional arguments:

iv_subdirectory TYPE /AWS1/DSYFSXWINDOWSSUBDIRECT00 /AWS1/DSYFSXWINDOWSSUBDIRECT00

Specifies a mount path for your file system using forward slashes. This is where DataSync reads or writes data (depending on if this is a source or destination location).

it_tags TYPE /AWS1/CL_DSYTAGLISTENTRY=>TT_INPUTTAGLIST TT_INPUTTAGLIST

Specifies labels that help you categorize, filter, and search for your Amazon Web Services resources. We recommend creating at least a name tag for your location.

iv_domain TYPE /AWS1/DSYSMBDOMAIN /AWS1/DSYSMBDOMAIN

Specifies the name of the Windows domain that the FSx for Windows File Server file system belongs to.

If you have multiple Active Directory domains in your environment, configuring this parameter makes sure that DataSync connects to the right file system.

iv_password TYPE /AWS1/DSYSMBPASSWORD /AWS1/DSYSMBPASSWORD

Specifies the password of the user with the permissions to mount and access the files, folders, and file metadata in your FSx for Windows File Server file system.

io_cmksecretconfig TYPE REF TO /AWS1/CL_DSYCMKSECRETCONFIG /AWS1/CL_DSYCMKSECRETCONFIG

Specifies configuration information for a DataSync-managed secret, which includes the password that DataSync uses to access a specific FSx Windows storage location, with a customer-managed KMS key.

When you include this parameter as part of a CreateLocationFsxWindows request, you provide only the KMS key ARN. DataSync uses this KMS key together with the Password you specify for to create a DataSync-managed secret to store the location access credentials.

Make sure that DataSync has permission to access the KMS key that you specify. For more information, see Using a service-managed secret encrypted with a custom KMS key.

You can use either CmkSecretConfig (with Password) or CustomSecretConfig (without Password) to provide credentials for a CreateLocationFsxWindows request. Do not provide both parameters for the same request.

io_customsecretconfig TYPE REF TO /AWS1/CL_DSYCUSTOMSECRETCONFIG /AWS1/CL_DSYCUSTOMSECRETCONFIG

Specifies configuration information for a customer-managed Secrets Manager secret where the password for an FSx for Windows File Server storage location is stored in plain text, in Secrets Manager. This configuration includes the secret ARN, and the ARN for an IAM role that provides access to the secret. For more information, see Using a secret that you manage.

You can use either CmkSecretConfig (with Password) or CustomSecretConfig (without Password) to provide credentials for a CreateLocationFsxWindows request. Do not provide both parameters for the same request.

RETURNING

oo_output TYPE REF TO /aws1/cl_dsycrelocfsxwindows01 /AWS1/CL_DSYCRELOCFSXWINDOWS01

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->createlocationfsxwindows(
  io_cmksecretconfig = new /aws1/cl_dsycmksecretconfig(
    iv_kmskeyarn = |string|
    iv_secretarn = |string|
  )
  io_customsecretconfig = new /aws1/cl_dsycustomsecretconfig(
    iv_secretaccessrolearn = |string|
    iv_secretarn = |string|
  )
  it_securitygrouparns = VALUE /aws1/cl_dsyec2secgrparnlist_w=>tt_ec2securitygrouparnlist(
    ( new /aws1/cl_dsyec2secgrparnlist_w( |string| ) )
  )
  it_tags = VALUE /aws1/cl_dsytaglistentry=>tt_inputtaglist(
    (
      new /aws1/cl_dsytaglistentry(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_domain = |string|
  iv_fsxfilesystemarn = |string|
  iv_password = |string|
  iv_subdirectory = |string|
  iv_user = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_locationarn = lo_result->get_locationarn( ).
ENDIF.