oidc_providers
Creates, updates, deletes or gets an oidc_provider resource or lists oidc_providers in a region
Overview
| Name | oidc_providers |
| Type | Resource |
| Description | Resource Type definition for AWS::IAM::OIDCProvider |
| Id | awscc.iam.oidc_providers |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
client_id_list | array | |
url | string | |
thumbprint_list | array | |
arn | string | Amazon Resource Name (ARN) of the OIDC provider |
tags | array | |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
arn | string | Amazon Resource Name (ARN) of the OIDC provider |
region | string | AWS region. |
For more information, see AWS::IAM::OIDCProvider.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | oidc_providers | INSERT | region |
delete_resource | oidc_providers | DELETE | Identifier, region |
update_resource | oidc_providers | UPDATE | Identifier, PatchDocument, region |
list_resources | oidc_providers_list_only | SELECT | region |
get_resource | oidc_providers | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual oidc_provider.
SELECT
region,
client_id_list,
url,
thumbprint_list,
arn,
tags
FROM awscc.iam.oidc_providers
WHERE
region = 'us-east-1' AND
Identifier = '{{ arn }}';
Lists all oidc_providers in a region.
SELECT
region,
arn
FROM awscc.iam.oidc_providers_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new oidc_provider resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.iam.oidc_providers (
ClientIdList,
Url,
ThumbprintList,
Tags,
region
)
SELECT
'{{ client_id_list }}',
'{{ url }}',
'{{ thumbprint_list }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.iam.oidc_providers (
ClientIdList,
Url,
ThumbprintList,
Tags,
region
)
SELECT
'{{ client_id_list }}',
'{{ url }}',
'{{ thumbprint_list }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: oidc_provider
props:
- name: client_id_list
value:
- '{{ client_id_list[0] }}'
- name: url
value: '{{ url }}'
- name: thumbprint_list
value:
- '{{ thumbprint_list[0] }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a oidc_provider resource, using stack-deploy.
/*+ update */
UPDATE awscc.iam.oidc_providers
SET PatchDocument = string('{{ {
"ClientIdList": client_id_list,
"ThumbprintList": thumbprint_list,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.iam.oidc_providers
WHERE
Identifier = '{{ arn }}' AND
region = 'us-east-1'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the oidc_providers resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
iam:CreateOpenIDConnectProvider,
iam:TagOpenIDConnectProvider,
iam:GetOpenIDConnectProvider
iam:GetOpenIDConnectProvider
iam:UpdateOpenIDConnectProviderThumbprint,
iam:RemoveClientIDFromOpenIDConnectProvider,
iam:AddClientIDToOpenIDConnectProvider,
iam:GetOpenIDConnectProvider,
iam:TagOpenIDConnectProvider,
iam:UntagOpenIDConnectProvider,
iam:ListOpenIDConnectProviderTags
iam:DeleteOpenIDConnectProvider
iam:ListOpenIDConnectProviders,
iam:GetOpenIDConnectProvider