Skip to main content

simple_ads

Creates, updates, deletes or gets a simple_ad resource or lists simple_ads in a region

Overview

Namesimple_ads
TypeResource
DescriptionResource Type definition for AWS::DirectoryService::SimpleAD
Idawscc.directoryservice.simple_ads

Fields

NameDatatypeDescription
directory_idstringThe unique identifier for a directory.
aliasstringThe alias for a directory.
dns_ip_addressesarrayThe IP addresses of the DNS servers for the directory, such as [ "172.31.3.154", "172.31.63.203" ].
create_aliasbooleanThe name of the configuration set.
descriptionstringDescription for the directory.
enable_ssobooleanWhether to enable single sign-on for a Simple Active Directory in AWS.
namestringThe fully qualified domain name for the AWS Managed Simple AD directory.
passwordstringThe password for the default administrative user named Admin.
short_namestringThe NetBIOS name for your domain.
sizestringThe size of the directory.
vpc_settingsobjectVPC settings of the Simple AD directory server in AWS.
regionstringAWS region.

For more information, see AWS::DirectoryService::SimpleAD.

Methods

NameResourceAccessible byRequired Params
create_resourcesimple_adsINSERTVpcSettings, Size, Name, region
delete_resourcesimple_adsDELETEIdentifier, region
update_resourcesimple_adsUPDATEIdentifier, PatchDocument, region
list_resourcessimple_ads_list_onlySELECTregion
get_resourcesimple_adsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual simple_ad.

SELECT
region,
directory_id,
alias,
dns_ip_addresses,
create_alias,
description,
enable_sso,
name,
password,
short_name,
size,
vpc_settings
FROM awscc.directoryservice.simple_ads
WHERE
region = 'us-east-1' AND
Identifier = '{{ directory_id }}';

INSERT example

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

/*+ create */
INSERT INTO awscc.directoryservice.simple_ads (
Name,
Size,
VpcSettings,
region
)
SELECT
'{{ name }}',
'{{ size }}',
'{{ vpc_settings }}',
'{{ region }}';

UPDATE example

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

/*+ update */
UPDATE awscc.directoryservice.simple_ads
SET PatchDocument = string('{{ {
"EnableSso": enable_sso
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ directory_id }}';

DELETE example

/*+ delete */
DELETE FROM awscc.directoryservice.simple_ads
WHERE
Identifier = '{{ directory_id }}' AND
region = 'us-east-1';

Permissions

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

ds:CreateDirectory,
ds:CreateAlias,
ds:EnableSso,
ds:DescribeDirectories,
ec2:DescribeSubnets,
ec2:DescribeVpcs,
ec2:CreateSecurityGroup,
ec2:CreateNetworkInterface,
ec2:DescribeNetworkInterfaces,
ec2:AuthorizeSecurityGroupIngress,
ec2:AuthorizeSecurityGroupEgress,
ec2:CreateTags,
ec2:RevokeSecurityGroupIngress,
ec2:RevokeSecurityGroupEgress