Skip to main content

location_object_storages

Creates, updates, deletes, gets or lists a location_object_storages resource.

Overview​

Namelocation_object_storages
TypeResource
Idaws.datasync.location_object_storages

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
access_keystringThe access key (for example, a user name) required to authenticate with the object storage system. (pattern: <code>^.*$</code>)
agent_arnsarrayThe ARNs of the DataSync agents that can connect with your object storage system.
cmk_secret_configobjectDescribes configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed KMS key.
creation_timestring (date-time)The time that the location was created.
custom_secret_configobjectDescribes configuration information for a customer-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location, and a customer-managed Identity and Access Management (IAM) role that provides access to the secret.
location_arnstringThe ARN of the object storage system location. (pattern: <code>^arn:(aws|aws-cn|aws-us-gov|aws-eusc|aws-iso|aws-iso-b):datasync:[a-z-0-9]+:[0-9]{12}:location/loc-[0-9a-z]{17}$</code>)
location_uristringThe URI of the object storage system location. (pattern: <code>^(efs|nfs|s3|smb|hdfs|fsx[a-z0-9-]+):​//[a-zA-Z0-9.:/-]+$</code>)
managed_secret_configobjectDescribes configuration information for a DataSync-managed secret, such as an authentication token or set of credentials that DataSync uses to access a specific transfer location. DataSync uses the default Amazon Web Services-managed KMS key to encrypt this secret in Secrets Manager.
server_certificatestring (byte)The certificate chain for DataSync to authenticate with your object storage system if the system uses a private or self-signed certificate authority (CA).
server_portintegerThe port that your object storage server accepts inbound network traffic on (for example, port 443).
server_protocolstringThe protocol that your object storage system uses to communicate. (HTTPS, HTTP)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_location_object_storageselectregionProvides details about how an DataSync transfer location for an object storage system is configured.
create_location_object_storageinsertregion, ServerHostname, BucketNameCreates a transfer location for an object storage system. DataSync can use this location as a source or destination for transferring data. You can make transfers with or without a DataSync agent. Before you begin, make sure that you understand the prerequisites for DataSync to work with object storage systems.
update_location_object_storageupdateregion, LocationArnModifies the following configuration parameters of the object storage transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an object storage system.

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples​

Provides details about how an DataSync transfer location for an object storage system is configured.

SELECT
access_key,
agent_arns,
cmk_secret_config,
creation_time,
custom_secret_config,
location_arn,
location_uri,
managed_secret_config,
server_certificate,
server_port,
server_protocol
FROM aws.datasync.location_object_storages
WHERE region = '{{ region }}' -- required
;

INSERT examples​

Creates a transfer location for an object storage system. DataSync can use this location as a source or destination for transferring data. You can make transfers with or without a DataSync agent. Before you begin, make sure that you understand the prerequisites for DataSync to work with object storage systems.

INSERT INTO aws.datasync.location_object_storages (
ServerHostname,
ServerPort,
ServerProtocol,
Subdirectory,
BucketName,
AccessKey,
SecretKey,
AgentArns,
Tags,
ServerCertificate,
CmkSecretConfig,
CustomSecretConfig,
region
)
SELECT
'{{ ServerHostname }}' /* required */,
{{ ServerPort }},
'{{ ServerProtocol }}',
'{{ Subdirectory }}',
'{{ BucketName }}' /* required */,
'{{ AccessKey }}',
'{{ SecretKey }}',
'{{ AgentArns }}',
'{{ Tags }}',
'{{ ServerCertificate }}',
'{{ CmkSecretConfig }}',
'{{ CustomSecretConfig }}',
'{{ region }}'
RETURNING
location_arn
;

UPDATE examples​

Modifies the following configuration parameters of the object storage transfer location that you're using with DataSync. For more information, see Configuring DataSync transfers with an object storage system.

UPDATE aws.datasync.location_object_storages
SET
LocationArn = '{{ LocationArn }}',
ServerPort = {{ ServerPort }},
ServerProtocol = '{{ ServerProtocol }}',
Subdirectory = '{{ Subdirectory }}',
ServerHostname = '{{ ServerHostname }}',
AccessKey = '{{ AccessKey }}',
SecretKey = '{{ SecretKey }}',
AgentArns = '{{ AgentArns }}',
ServerCertificate = '{{ ServerCertificate }}',
CmkSecretConfig = '{{ CmkSecretConfig }}',
CustomSecretConfig = '{{ CustomSecretConfig }}'
WHERE
region = '{{ region }}' --required
AND LocationArn = '{{ LocationArn }}' --required;