service_principal_names
Creates, updates, deletes, gets or lists a service_principal_names resource.
Overview
| Name | service_principal_names |
| Type | Resource |
| Id | aws.pca_connector_ad.service_principal_names |
Fields
The following fields are returned by SELECT queries:
- get_service_principal_name
- list_service_principal_names
| Name | Datatype | Description |
|---|---|---|
connector_arn | string | The 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_at | string (date-time) | The date and time that the service principal name was created. |
directory_registration_arn | string | The 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>) |
status | string | The status of a service principal name. (CREATING, ACTIVE, DELETING, FAILED) |
status_reason | string | Additional 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_at | string (date-time) | The date and time that the service principal name was updated. |
| Name | Datatype | Description |
|---|---|---|
connector_arn | string | The Amazon Resource Name (ARN) that was returned when you called CreateConnector. (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_at | string (date-time) | The date and time that the service principal name was created. |
directory_registration_arn | string | The 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>) |
status | string | The status of a service principal name. (CREATING, ACTIVE, DELETING, FAILED) |
status_reason | string | Additional 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_at | string (date-time) | Time when the service principal name was updated. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_service_principal_name | select | connector_arn, directory_registration_arn, region | Lists the service principal name that the connector uses to authenticate with Active Directory. | |
list_service_principal_names | select | directory_registration_arn, region | MaxResults, NextToken | Lists the service principal names that the connector uses to authenticate with Active Directory. |
create_service_principal_name | insert | connector_arn, directory_registration_arn, region | 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. | |
delete_service_principal_name | delete | connector_arn, directory_registration_arn, region | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
connector_arn | string | The Amazon Resource Name (ARN) that was returned when you called CreateConnector. |
directory_registration_arn | string | The Amazon Resource Name (ARN) that was returned when you called CreateDirectoryRegistration. |
region | string | AWS region (default: us-east-1) |
MaxResults | integer | Use 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. |
NextToken | string | Use 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
- get_service_principal_name
- list_service_principal_names
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
;
Lists the service principal names 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 directory_registration_arn = '{{ directory_registration_arn }}' -- required
AND region = '{{ region }}' -- required
AND MaxResults = '{{ MaxResults }}'
AND NextToken = '{{ NextToken }}'
;
INSERT examples
- create_service_principal_name
- Manifest
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 }}'
;
# Description fields are for documentation purposes
- name: service_principal_names
props:
- name: connector_arn
value: "{{ connector_arn }}"
description: Required parameter for the service_principal_names resource.
- name: directory_registration_arn
value: "{{ directory_registration_arn }}"
description: Required parameter for the service_principal_names resource.
- name: region
value: "{{ region }}"
description: Required parameter for the service_principal_names resource.
- name: ClientToken
value: "{{ ClientToken }}"
DELETE examples
- delete_service_principal_name
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
;