Skip to main content

trusts

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

Overview

Nametrusts
TypeResource
Idaws.ds.trusts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
created_date_timestring (date-time)The date and time that the trust relationship was created.
directory_idstringThe Directory ID of the Amazon Web Services directory involved in the trust relationship. (pattern: <code>^d-[0-9a-f]{10}$</code>)
last_updated_date_timestring (date-time)The date and time that the trust relationship was last updated.
remote_domain_namestringThe Fully Qualified Domain Name (FQDN) of the external domain involved in the trust relationship. (pattern: <code>^([a-zA-Z0-9]+[\.-])+([a-zA-Z0-9])+[.]?$</code>)
selective_authstringCurrent state of selective authentication for the trust. (Enabled, Disabled)
state_last_updated_date_timestring (date-time)The date and time that the TrustState was last updated.
trust_directionstringThe trust relationship direction. (One-Way: Outgoing, One-Way: Incoming, Two-Way)
trust_idstringThe unique ID of the trust relationship. (pattern: <code>^t-[0-9a-f]{10}$</code>)
trust_statestringThe trust relationship state. (Creating, Created, Verifying, VerifyFailed, Verified, Updating, UpdateFailed, Updated, Deleting, Deleted, Failed)
trust_state_reasonstringThe reason for the TrustState.
trust_typestringThe trust relationship type. Forest is the default. (Forest, External)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_trustsselectregionObtains information about the trust relationships for this account. If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.
create_trustinsertregion, DirectoryId, RemoteDomainName, TrustPassword, TrustDirectionDirectory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your Managed Microsoft AD directory, and your existing self-managed Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials. This action initiates the creation of the Amazon Web Services side of a trust relationship between an Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.
update_trustupdateregion, TrustIdUpdates the trust that has been set up between your Managed Microsoft AD directory and an self-managed Active Directory.
delete_trustdeleteregionDeletes an existing trust relationship between your Managed Microsoft AD directory and an external domain.
verify_trustexecregion, TrustIdDirectory Service for Microsoft Active Directory allows you to configure and verify trust relationships. This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.

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

Obtains information about the trust relationships for this account. If no input parameters are provided, such as DirectoryId or TrustIds, this request describes all the trust relationships belonging to the account.

SELECT
created_date_time,
directory_id,
last_updated_date_time,
remote_domain_name,
selective_auth,
state_last_updated_date_time,
trust_direction,
trust_id,
trust_state,
trust_state_reason,
trust_type
FROM aws.ds.trusts
WHERE region = '{{ region }}' -- required
;

INSERT examples

Directory Service for Microsoft Active Directory allows you to configure trust relationships. For example, you can establish a trust between your Managed Microsoft AD directory, and your existing self-managed Microsoft Active Directory. This would allow you to provide users and groups access to resources in either domain, with a single set of credentials. This action initiates the creation of the Amazon Web Services side of a trust relationship between an Managed Microsoft AD directory and an external domain. You can create either a forest trust or an external trust.

INSERT INTO aws.ds.trusts (
DirectoryId,
RemoteDomainName,
TrustPassword,
TrustDirection,
TrustType,
ConditionalForwarderIpAddrs,
ConditionalForwarderIpv6Addrs,
SelectiveAuth,
region
)
SELECT
'{{ DirectoryId }}' /* required */,
'{{ RemoteDomainName }}' /* required */,
'{{ TrustPassword }}' /* required */,
'{{ TrustDirection }}' /* required */,
'{{ TrustType }}',
'{{ ConditionalForwarderIpAddrs }}',
'{{ ConditionalForwarderIpv6Addrs }}',
'{{ SelectiveAuth }}',
'{{ region }}'
RETURNING
trust_id
;

UPDATE examples

Updates the trust that has been set up between your Managed Microsoft AD directory and an self-managed Active Directory.

UPDATE aws.ds.trusts
SET
TrustId = '{{ TrustId }}',
SelectiveAuth = '{{ SelectiveAuth }}'
WHERE
region = '{{ region }}' --required
AND TrustId = '{{ TrustId }}' --required
RETURNING
request_id,
trust_id;

DELETE examples

Deletes an existing trust relationship between your Managed Microsoft AD directory and an external domain.

DELETE FROM aws.ds.trusts
WHERE region = '{{ region }}' --required
;

Lifecycle Methods

Directory Service for Microsoft Active Directory allows you to configure and verify trust relationships. This action verifies a trust relationship between your Managed Microsoft AD directory and an external domain.

EXEC aws.ds.trusts.verify_trust
@region='{{ region }}' --required
@@json=
'{
"TrustId": "{{ TrustId }}"
}'
;