location_object_storages
Creates, updates, deletes or gets a location_object_storage
resource or lists location_object_storages
in a region
Overview
Name | location_object_storages |
Type | Resource |
Description | Resource schema for AWS::DataSync::LocationObjectStorage. |
Id | aws.datasync.location_object_storages |
Fields
Name | Datatype | Description |
---|---|---|
access_key | string | Optional. The access key is used if credentials are required to access the self-managed object storage server. |
agent_arns | array | The Amazon Resource Name (ARN) of the agents associated with the self-managed object storage server location. |
bucket_name | string | The name of the bucket on the self-managed object storage server. |
secret_key | string | Optional. The secret key is used if credentials are required to access the self-managed object storage server. |
server_certificate | string | X.509 PEM content containing a certificate authority or chain to trust. |
server_hostname | string | The 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_port | integer | The port that your self-managed server accepts inbound network traffic on. |
server_protocol | string | The protocol that the object storage server uses to communicate. |
subdirectory | string | The subdirectory in the self-managed object storage server that is used to read data from. |
tags | array | An array of key-value pairs to apply to this resource. |
location_arn | string | The Amazon Resource Name (ARN) of the location that is created. |
location_uri | string | The URL of the object storage location that was described. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | AgentArns, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all location_object_storages
in a region.
SELECT
region,
access_key,
agent_arns,
bucket_name,
secret_key,
server_certificate,
server_hostname,
server_port,
server_protocol,
subdirectory,
tags,
location_arn,
location_uri
FROM aws.datasync.location_object_storages
WHERE region = 'us-east-1';
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
FROM aws.datasync.location_object_storages
WHERE region = 'us-east-1' AND data__Identifier = '<LocationArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new location_object_storage
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.datasync.location_object_storages (
AgentArns,
region
)
SELECT
'{{ AgentArns }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.datasync.location_object_storages (
AccessKey,
AgentArns,
BucketName,
SecretKey,
ServerCertificate,
ServerHostname,
ServerPort,
ServerProtocol,
Subdirectory,
Tags,
region
)
SELECT
'{{ AccessKey }}',
'{{ AgentArns }}',
'{{ BucketName }}',
'{{ SecretKey }}',
'{{ ServerCertificate }}',
'{{ ServerHostname }}',
'{{ ServerPort }}',
'{{ ServerProtocol }}',
'{{ Subdirectory }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: location_object_storage
props:
- name: AccessKey
value: '{{ AccessKey }}'
- name: AgentArns
value:
- '{{ AgentArns[0] }}'
- name: BucketName
value: '{{ BucketName }}'
- name: SecretKey
value: '{{ SecretKey }}'
- name: ServerCertificate
value: '{{ ServerCertificate }}'
- name: ServerHostname
value: '{{ ServerHostname }}'
- name: ServerPort
value: '{{ ServerPort }}'
- name: ServerProtocol
value: '{{ ServerProtocol }}'
- name: Subdirectory
value: '{{ Subdirectory }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.datasync.location_object_storages
WHERE data__Identifier = '<LocationArn>'
AND region = 'us-east-1';
Permissions
To operate on the location_object_storages
resource, the following permissions are required:
Create
datasync:CreateLocationObjectStorage,
datasync:DescribeLocationObjectStorage,
datasync:ListTagsForResource,
datasync:TagResource
Read
datasync:DescribeLocationObjectStorage,
datasync:ListTagsForResource
Update
datasync:DescribeLocationObjectStorage,
datasync:ListTagsForResource,
datasync:TagResource,
datasync:UntagResource,
datasync:UpdateLocationObjectStorage
Delete
datasync:DeleteLocation
List
datasync:ListLocations