service_principal_names
Creates, updates, deletes or gets a service_principal_name
resource or lists service_principal_names
in a region
Overview
Name | service_principal_names |
Type | Resource |
Description | Definition of AWS::PCAConnectorAD::ServicePrincipalName Resource Type |
Id | aws.pcaconnectorad.service_principal_names |
Fields
Name | Datatype | Description |
---|---|---|
connector_arn | string | |
directory_registration_arn | string | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | region |
delete_resource | DELETE | data__Identifier, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all service_principal_names
in a region.
SELECT
region,
connector_arn,
directory_registration_arn
FROM aws.pcaconnectorad.service_principal_names
WHERE region = 'us-east-1';
Gets all properties from an individual service_principal_name
.
SELECT
region,
connector_arn,
directory_registration_arn
FROM aws.pcaconnectorad.service_principal_names
WHERE region = 'us-east-1' AND data__Identifier = '<ConnectorArn>|<DirectoryRegistrationArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new service_principal_name
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.pcaconnectorad.service_principal_names (
ConnectorArn,
DirectoryRegistrationArn,
region
)
SELECT
'{{ ConnectorArn }}',
'{{ DirectoryRegistrationArn }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.pcaconnectorad.service_principal_names (
ConnectorArn,
DirectoryRegistrationArn,
region
)
SELECT
'{{ ConnectorArn }}',
'{{ DirectoryRegistrationArn }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: service_principal_name
props:
- name: ConnectorArn
value: '{{ ConnectorArn }}'
- name: DirectoryRegistrationArn
value: '{{ DirectoryRegistrationArn }}'
DELETE
example
/*+ delete */
DELETE FROM aws.pcaconnectorad.service_principal_names
WHERE data__Identifier = '<ConnectorArn|DirectoryRegistrationArn>'
AND region = 'us-east-1';
Permissions
To operate on the service_principal_names
resource, the following permissions are required:
Create
ds:UpdateAuthorizedApplication,
pca-connector-ad:GetServicePrincipalName,
pca-connector-ad:CreateServicePrincipalName
Read
pca-connector-ad:GetServicePrincipalName
Delete
ds:UpdateAuthorizedApplication,
pca-connector-ad:GetServicePrincipalName,
pca-connector-ad:DeleteServicePrincipalName
List
pca-connector-ad:ListServicePrincipalNames