Skip to main content

service_principal_names

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

Overview

Nameservice_principal_names
TypeResource
Idaws.pca_connector_ad.service_principal_names

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
connector_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateConnector.html. (pattern: <code>^arn:[\w-]+:pca-connector-ad:[\w-]+:[0-9]+:connector/[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}$</code>)
created_atstring (date-time)The date and time that the service principal name was created.
directory_registration_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateDirectoryRegistration. (pattern: <code>^arn:[\w-]+:pca-connector-ad:[\w-]+:[0-9]+:directory-registration/d-[0-9a-f]{10}$</code>)
statusstringThe status of a service principal name. (CREATING, ACTIVE, DELETING, FAILED)
status_reasonstringAdditional information for the status of a service principal name if the status is failed. (DIRECTORY_ACCESS_DENIED, DIRECTORY_NOT_REACHABLE, DIRECTORY_RESOURCE_NOT_FOUND, SPN_EXISTS_ON_DIFFERENT_AD_OBJECT, SPN_LIMIT_EXCEEDED, INTERNAL_FAILURE)
updated_atstring (date-time)The date and time that the service principal name was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_service_principal_nameselectconnector_arn, directory_registration_arn, regionLists the service principal name that the connector uses to authenticate with Active Directory.
list_service_principal_namesselectdirectory_registration_arn, regionMaxResults, NextTokenLists the service principal names that the connector uses to authenticate with Active Directory.
create_service_principal_nameinsertconnector_arn, directory_registration_arn, regionCreates a service principal name (SPN) for the service account in Active Directory. Kerberos authentication uses SPNs to associate a service instance with a service sign-in account.
delete_service_principal_namedeleteconnector_arn, directory_registration_arn, regionDeletes the service principal name (SPN) used by a connector to authenticate with your Active Directory.

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
connector_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateConnector.
directory_registration_arnstringThe Amazon Resource Name (ARN) that was returned when you called CreateDirectoryRegistration.
regionstringAWS region (default: us-east-1)
MaxResultsintegerUse this parameter when paginating results to specify the maximum number of items to return in the response on each page. If additional items exist beyond the number you specify, the NextToken element is sent in the response. Use this NextToken value in a subsequent request to retrieve additional items.
NextTokenstringUse this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of the NextToken parameter from the response you just received.

SELECT examples

Lists the service principal name that the connector uses to authenticate with Active Directory.

SELECT
connector_arn,
created_at,
directory_registration_arn,
status,
status_reason,
updated_at
FROM aws.pca_connector_ad.service_principal_names
WHERE connector_arn = '{{ connector_arn }}' -- required
AND directory_registration_arn = '{{ directory_registration_arn }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a service principal name (SPN) for the service account in Active Directory. Kerberos authentication uses SPNs to associate a service instance with a service sign-in account.

INSERT INTO aws.pca_connector_ad.service_principal_names (
ClientToken,
connector_arn,
directory_registration_arn,
region
)
SELECT
'{{ ClientToken }}',
'{{ connector_arn }}',
'{{ directory_registration_arn }}',
'{{ region }}'
;

DELETE examples

Deletes the service principal name (SPN) used by a connector to authenticate with your Active Directory.

DELETE FROM aws.pca_connector_ad.service_principal_names
WHERE connector_arn = '{{ connector_arn }}' --required
AND directory_registration_arn = '{{ directory_registration_arn }}' --required
AND region = '{{ region }}' --required
;