Skip to main content

shared_directories

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

Overview

Nameshared_directories
TypeResource
Idaws.ds.shared_directories

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_date_timestring (date-time)The date and time that the shared directory was created.
last_updated_date_timestring (date-time)The date and time that the shared directory was last updated.
owner_account_idstringIdentifier of the directory owner account, which contains the directory that has been shared to the consumer account. (pattern: <code>^(\d{12})$</code>)
owner_directory_idstringIdentifier of the directory in the directory owner account. (pattern: <code>^d-[0-9a-f]{10}$</code>)
share_methodstringThe 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_notesstringA 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_statusstringCurrent directory status of the shared Managed Microsoft AD directory. (Shared, PendingAcceptance, Rejected, Rejecting, RejectFailed, Sharing, ShareFailed, Deleted, Deleting)
shared_account_idstringIdentifier 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_idstringIdentifier 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:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_shared_directoriesselectregionReturns the shared directories in your account.
accept_shared_directoryexecregion, SharedDirectoryIdAccepts a directory sharing request that was sent from the directory owner account.
reject_shared_directoryexecregion, SharedDirectoryIdRejects 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.

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

SELECT examples

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

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 }}"
}'
;