AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates an IAM entity to describe an identity provider (IdP) that supports OpenID Connect (OIDC).

The OIDC provider that you create with this operation can be used as a principal in a role's trust policy. Such a policy establishes a trust relationship between AWS and the OIDC provider.

When you create the IAM OIDC provider, you specify the following:

You get all of this information from the OIDC IdP that you want to use to access AWS.

Because trust for the OIDC provider is derived from the IAM provider that this operation creates, it is best to limit access to the CreateOpenIDConnectProvider operation to highly privileged users.

Note:

For .NET Core, PCL and Unity this operation is only available in asynchronous form. Please refer to CreateOpenIDConnectProviderAsync.

Namespace: Amazon.IdentityManagement
Assembly: AWSSDK.IdentityManagement.dll
Version: 3.x.y.z

Syntax

C#
public abstract CreateOpenIDConnectProviderResponse CreateOpenIDConnectProvider(
         CreateOpenIDConnectProviderRequest request
)
Parameters
request
Type: Amazon.IdentityManagement.Model.CreateOpenIDConnectProviderRequest

Container for the necessary parameters to execute the CreateOpenIDConnectProvider service method.

Return Value
The response from the CreateOpenIDConnectProvider service method, as returned by IdentityManagementService.

Exceptions

ExceptionCondition
EntityAlreadyExistsException The request was rejected because it attempted to create a resource that already exists.
InvalidInputException The request was rejected because an invalid or out-of-range value was supplied for an input parameter.
LimitExceededException The request was rejected because it attempted to create resources beyond the current AWS account limits. The error message describes the limit exceeded.
ServiceFailureException The request processing has failed because of an unknown error, exception or failure.

Examples

The following example defines a new OIDC provider in IAM with a client ID of my-application-id and pointing at the server with a URL of https://server.example.com.

To create an instance profile


var response = client.CreateOpenIDConnectProvider(new CreateOpenIDConnectProviderRequest 
{
    ClientIDList = new List {
        "my-application-id"
    },
    ThumbprintList = new List {
        "3768084dfb3d2b68b7897bf5f565da8efEXAMPLE"
    },
    Url = "https://server.example.com"
});

string openIDConnectProviderArn = response.OpenIDConnectProviderArn;

            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

Unity:
Supported Versions: 4.6 and above
Supported Platforms: Android, iOS, Standalone

See Also