Skip to main content

service_principal_names

Creates, updates, deletes or gets a service_principal_name resource or lists service_principal_names in a region

Overview

Nameservice_principal_names
TypeResource
DescriptionDefinition of AWS::PCAConnectorAD::ServicePrincipalName Resource Type
Idaws.pcaconnectorad.service_principal_names

Fields

NameDatatypeDescription
connector_arnstring
directory_registration_arnstring
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTregion
delete_resourceDELETEdata__Identifier, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.pcaconnectorad.service_principal_names (
ConnectorArn,
DirectoryRegistrationArn,
region
)
SELECT
'{{ ConnectorArn }}',
'{{ DirectoryRegistrationArn }}',
'{{ region }}';

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