There are more AWS SDK examples available in the AWS Doc SDK Examples
Use GetOpenIdConnectProvider
with a CLI
The following code examples show how to use GetOpenIdConnectProvider
.
- CLI
-
- AWS CLI
-
To return information about the specified OpenID Connect provider
This example returns details about the OpenID Connect provider whose ARN is
arn:aws:iam::123456789012:oidc-provider/server.example.com
.aws iam get-open-id-connect-provider \ --open-id-connect-provider-arn
arn:aws:iam::123456789012:oidc-provider/server.example.com
Output:
{ "Url": "server.example.com" "CreateDate": "2015-06-16T19:41:48Z", "ThumbprintList": [ "12345abcdefghijk67890lmnopqrst987example" ], "ClientIDList": [ "example-application-ID" ] }
For more information, see Creating OpenID Connect (OIDC) identity providers in the AWS IAM User Guide.
-
For API details, see GetOpenIdConnectProvider
in AWS CLI Command Reference.
-
- PowerShell
-
- Tools for PowerShell
-
Example 1: This example returns details about the OpenID Connect provider whose ARN is
arn:aws:iam::123456789012:oidc-provider/accounts.google.com
. TheClientIDList
property is a collection that contains all the Client IDs defined for this provider.Get-IAMOpenIDConnectProvider -OpenIDConnectProviderArn arn:aws:iam::123456789012:oidc-provider/oidc.example.com
Output:
ClientIDList CreateDate ThumbprintList Url ------------ ---------- -------------- --- {MyOIDCApp} 2/3/2015 3:00:30 PM {12345abcdefghijk67890lmnopqrst98765uvwxy} oidc.example.com
-
For API details, see GetOpenIdConnectProvider in AWS Tools for PowerShell Cmdlet Reference.
-