Skip to main content

location_object_storages

Creates, updates, deletes or gets a location_object_storage resource or lists location_object_storages in a region

Overview

Namelocation_object_storages
TypeResource
DescriptionResource Type definition for AWS::DataSync::LocationObjectStorage.
Idawscc.datasync.location_object_storages

Fields

NameDatatypeDescription
access_keystringOptional. The access key is used if credentials are required to access the self-managed object storage server.
agent_arnsarraySpecifies the Amazon Resource Names (ARNs) of the DataSync agents that can connect with your object storage system. If you are setting up an agentless cross-cloud transfer, you do not need to specify a value for this parameter.
bucket_namestringThe name of the bucket on the self-managed object storage server.
secret_keystringOptional. The secret key is used if credentials are required to access the self-managed object storage server.
server_certificatestringX.509 PEM content containing a certificate authority or chain to trust.
server_hostnamestringThe name of the self-managed object storage server. This value is the IP address or Domain Name Service (DNS) name of the object storage server.
server_portintegerThe port that your self-managed server accepts inbound network traffic on.
server_protocolstringThe protocol that the object storage server uses to communicate.
subdirectorystringThe subdirectory in the self-managed object storage server that is used to read data from.
tagsarrayAn array of key-value pairs to apply to this resource.
location_arnstringThe Amazon Resource Name (ARN) of the location that is created.
location_uristringThe URL of the object storage location that was described.
cmk_secret_configobjectSpecifies 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 AWS KMS key.
custom_secret_configobjectSpecifies 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 an IAM role that DataSync can assume and access the customer-managed secret.
managed_secret_configobjectSpecifies 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 AWS-managed KMS key to encrypt this secret in AWS Secrets Manager.
regionstringAWS region.

For more information, see AWS::DataSync::LocationObjectStorage.

Methods

NameResourceAccessible byRequired Params
create_resourcelocation_object_storagesINSERTregion
delete_resourcelocation_object_storagesDELETEIdentifier, region
update_resourcelocation_object_storagesUPDATEIdentifier, PatchDocument, region
list_resourceslocation_object_storages_list_onlySELECTregion
get_resourcelocation_object_storagesSELECTIdentifier, region

SELECT examples

Gets all properties from an individual location_object_storage.

SELECT
region,
access_key,
agent_arns,
bucket_name,
secret_key,
server_certificate,
server_hostname,
server_port,
server_protocol,
subdirectory,
tags,
location_arn,
location_uri,
cmk_secret_config,
custom_secret_config,
managed_secret_config
FROM awscc.datasync.location_object_storages
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}';

INSERT example

Use the following StackQL query and manifest file to create a new location_object_storage resource, using stack-deploy.

/*+ create */
INSERT INTO awscc.datasync.location_object_storages (
AccessKey,
AgentArns,
BucketName,
SecretKey,
ServerCertificate,
ServerHostname,
ServerPort,
ServerProtocol,
Subdirectory,
Tags,
CmkSecretConfig,
CustomSecretConfig,
region
)
SELECT
'{{ access_key }}',
'{{ agent_arns }}',
'{{ bucket_name }}',
'{{ secret_key }}',
'{{ server_certificate }}',
'{{ server_hostname }}',
'{{ server_port }}',
'{{ server_protocol }}',
'{{ subdirectory }}',
'{{ tags }}',
'{{ cmk_secret_config }}',
'{{ custom_secret_config }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

UPDATE example

Use the following StackQL query and manifest file to update a location_object_storage resource, using stack-deploy.

/*+ update */
UPDATE awscc.datasync.location_object_storages
SET PatchDocument = string('{{ {
"AccessKey": access_key,
"AgentArns": agent_arns,
"SecretKey": secret_key,
"ServerCertificate": server_certificate,
"ServerHostname": server_hostname,
"ServerPort": server_port,
"ServerProtocol": server_protocol,
"Subdirectory": subdirectory,
"Tags": tags,
"CustomSecretConfig": custom_secret_config
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ location_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

DELETE example

/*+ delete */
DELETE FROM awscc.datasync.location_object_storages
WHERE
Identifier = '{{ location_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;

Additional Parameters

Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:

ParameterDescription
ClientToken
A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.
A client token is valid for 36 hours once used.
After that, a resource request with the same client token is treated as a new request.
If you do not specify a client token, one is generated for inclusion in the request.
RoleArn
The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.
If you do not specify a role, a temporary session is created using your AWS user credentials.
TypeVersionId
For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used.

Permissions

To operate on the location_object_storages resource, the following permissions are required:

datasync:CreateLocationObjectStorage,
datasync:DescribeLocationObjectStorage,
datasync:ListTagsForResource,
datasync:TagResource,
secretsmanager:CreateSecret,
secretsmanager:PutSecretValue,
secretsmanager:DeleteSecret,
iam:CreateServiceLinkedRole,
iam:PassRole,
kms:Encrypt,
kms:Decrypt,
kms:GenerateDataKey