shared_directories
Creates, updates, deletes, gets or lists a shared_directories resource.
Overview
| Name | shared_directories |
| Type | Resource |
| Id | aws.ds.shared_directories |
Fields
The following fields are returned by SELECT queries:
- describe_shared_directories
| Name | Datatype | Description |
|---|---|---|
created_date_time | string (date-time) | The date and time that the shared directory was created. |
last_updated_date_time | string (date-time) | The date and time that the shared directory was last updated. |
owner_account_id | string | Identifier of the directory owner account, which contains the directory that has been shared to the consumer account. (pattern: <code>^(\d{12})$</code>) |
owner_directory_id | string | Identifier of the directory in the directory owner account. (pattern: <code>^d-[0-9a-f]{10}$</code>) |
share_method | string | The method used when sharing a directory to determine whether the directory should be shared within your Amazon Web Services organization (ORGANIZATIONS) or with any Amazon Web Services account by sending a shared directory request (HANDSHAKE). (ORGANIZATIONS, HANDSHAKE) |
share_notes | string | A directory share request that is sent by the directory owner to the directory consumer. The request includes a typed message to help the directory consumer administrator determine whether to approve or reject the share invitation. |
share_status | string | Current directory status of the shared Managed Microsoft AD directory. (Shared, PendingAcceptance, Rejected, Rejecting, RejectFailed, Sharing, ShareFailed, Deleted, Deleting) |
shared_account_id | string | Identifier of the directory consumer account that has access to the shared directory (OwnerDirectoryId) in the directory owner account. (pattern: <code>^(\d{12})$</code>) |
shared_directory_id | string | Identifier of the shared directory in the directory consumer account. This identifier is different for each directory owner account. (pattern: <code>^d-[0-9a-f]{10}$</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_shared_directories | select | region | Returns the shared directories in your account. | |
accept_shared_directory | exec | region, SharedDirectoryId | Accepts a directory sharing request that was sent from the directory owner account. | |
reject_shared_directory | exec | region, SharedDirectoryId | Rejects a directory sharing request that was sent from the directory owner account. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_shared_directories
Returns the shared directories in your account.
SELECT
created_date_time,
last_updated_date_time,
owner_account_id,
owner_directory_id,
share_method,
share_notes,
share_status,
shared_account_id,
shared_directory_id
FROM aws.ds.shared_directories
WHERE region = '{{ region }}' -- required
;
Lifecycle Methods
- accept_shared_directory
- reject_shared_directory
Accepts a directory sharing request that was sent from the directory owner account.
EXEC aws.ds.shared_directories.accept_shared_directory
@region='{{ region }}' --required
@@json=
'{
"SharedDirectoryId": "{{ SharedDirectoryId }}"
}'
;
Rejects a directory sharing request that was sent from the directory owner account.
EXEC aws.ds.shared_directories.reject_shared_directory
@region='{{ region }}' --required
@@json=
'{
"SharedDirectoryId": "{{ SharedDirectoryId }}"
}'
;