simple_ads
Creates, updates, deletes or gets a simple_ad
resource or lists simple_ads
in a region
Overview
Name | simple_ads |
Type | Resource |
Description | Resource Type definition for AWS::DirectoryService::SimpleAD |
Id | aws.directoryservice.simple_ads |
Fields
Name | Datatype | Description |
---|---|---|
directory_id | string | The unique identifier for a directory. |
alias | string | The alias for a directory. |
dns_ip_addresses | array | The IP addresses of the DNS servers for the directory, such as [ "172.31.3.154", "172.31.63.203" ]. |
create_alias | boolean | The name of the configuration set. |
description | string | Description for the directory. |
enable_sso | boolean | Whether to enable single sign-on for a Simple Active Directory in AWS. |
name | string | The fully qualified domain name for the AWS Managed Simple AD directory. |
password | string | The password for the default administrative user named Admin. |
short_name | string | The NetBIOS name for your domain. |
size | string | The size of the directory. |
vpc_settings | object | VPC settings of the Simple AD directory server in AWS. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | VpcSettings, Size, Name, 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 simple_ads
in a region.
SELECT
region,
directory_id,
alias,
dns_ip_addresses,
create_alias,
description,
enable_sso,
name,
password,
short_name,
size,
vpc_settings
FROM aws.directoryservice.simple_ads
WHERE region = 'us-east-1';
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 aws.directoryservice.simple_ads
WHERE region = 'us-east-1' AND data__Identifier = '<DirectoryId>';
INSERT
example
Use the following StackQL query and manifest file to create a new simple_ad
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.directoryservice.simple_ads (
Name,
Size,
VpcSettings,
region
)
SELECT
'{{ Name }}',
'{{ Size }}',
'{{ VpcSettings }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.directoryservice.simple_ads (
CreateAlias,
Description,
EnableSso,
Name,
Password,
ShortName,
Size,
VpcSettings,
region
)
SELECT
'{{ CreateAlias }}',
'{{ Description }}',
'{{ EnableSso }}',
'{{ Name }}',
'{{ Password }}',
'{{ ShortName }}',
'{{ Size }}',
'{{ VpcSettings }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: simple_ad
props:
- name: CreateAlias
value: '{{ CreateAlias }}'
- name: Description
value: '{{ Description }}'
- name: EnableSso
value: '{{ EnableSso }}'
- name: Name
value: '{{ Name }}'
- name: Password
value: '{{ Password }}'
- name: ShortName
value: '{{ ShortName }}'
- name: Size
value: '{{ Size }}'
- name: VpcSettings
value:
SubnetIds:
- '{{ SubnetIds[0] }}'
VpcId: '{{ VpcId }}'
DELETE
example
/*+ delete */
DELETE FROM aws.directoryservice.simple_ads
WHERE data__Identifier = '<DirectoryId>'
AND region = 'us-east-1';
Permissions
To operate on the simple_ads
resource, the following permissions are required:
Create
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
Read
ds:DescribeDirectories
Update
ds:EnableSso,
ds:DisableSso,
ds:DescribeDirectories
Delete
ds:DeleteDirectory,
ds:DescribeDirectories,
ec2:DescribeNetworkInterfaces,
ec2:DeleteSecurityGroup,
ec2:DeleteNetworkInterface,
ec2:RevokeSecurityGroupIngress,
ec2:RevokeSecurityGroupEgress,
ec2:DeleteTags
List
ds:DescribeDirectories