OCISDK/OCISDK/Identity/identityClient.cs
/// <summary>
/// Creates a new identity provider in your tenancy. For more information, see Identity Providers and Federation.
/// 
/// You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy 
/// is simply the root compartment. For information about OCIDs, see Resource Identifiers.
/// 
/// You must also specify a name for the IdentityProvider, which must be unique across all IdentityProvider objects 
/// in your tenancy and cannot be changed.
/// 
/// You must also specify a description for the IdentityProvider (although it can be an empty string). It does not 
/// have to be unique, and you can change it anytime with UpdateIdentityProvider.
/// 
/// After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object, 
/// first make sure its lifecycleState has changed to ACTIVE.
/// </summary>
Creates a new identity provider in your tenancy. For more information, see Identity Providers and Federation.

You must specify your tenancy's OCID as the compartment ID in the request object. Remember that the tenancy
is simply the root compartment. For information about OCIDs, see Resource Identifiers.

You must also specify a name for the IdentityProvider, which must be unique across all IdentityProvider objects
in your tenancy and cannot be changed.

You must also specify a description for the IdentityProvider (although it can be an empty string). It does not
have to be unique, and you can change it anytime with UpdateIdentityProvider.

After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object,
first make sure its lifecycleState has changed to ACTIVE.
Creates a new identity provider in your tenancy . For more information see Identity Providers and Federation . You must specify your tenancy ' s OCID as the compartment ID in the request object . Remember that the tenancy is simply the root compartment . For information about OCIDs see Resource Identifiers . You must also specify a name for the IdentityProvider which must be unique across all IdentityProvider objects in your tenancy and cannot be changed . You must also specify a description for the IdentityProvider ( although it can be an empty string ) . It does not have to be unique and you can change it anytime with UpdateIdentityProvider . After you send your request the new object ' s lifecycleState will temporarily be CREATING . Before using the object first make sure its lifecycleState has changed to ACTIVE .
public CreateIdentityProviderResponse CreateIdentityProvider(CreateIdentityProviderRequest request)
        {
            var uri = new Uri($"{GetEndPoint(IdentityServices.IdentityProviders, this.Region)}");
            using (var webResponse = this.RestClient.Post(uri, request.CreateIdentityProviderDetails, new HttpRequestHeaderParam() { OpcRetryToken = request.OpcRetryToken }))
            using (var stream = webResponse.GetResponseStream())
            using (var reader = new StreamReader(stream))
            {
                var response = reader.ReadToEnd();
                return new CreateIdentityProviderResponse()
                {
                    IdentityProvider = JsonSerializer.Deserialize<IdentityProvider>(response),
                    OpcRequestId = webResponse.Headers.Get("opc-request-id"),
                    ETag = webResponse.Headers.Get("ETag")
                };
            }
        }
public CreateIdentityProviderResponse CreateIdentityProvider ( CreateIdentityProviderRequest request ) { var uri = new Uri ( $" { GetEndPoint ( IdentityServices . IdentityProviders , this . Region ) } " ) ; using ( var webResponse = this . RestClient . Post ( uri , request . CreateIdentityProviderDetails , new HttpRequestHeaderParam ( ) { OpcRetryToken = request . OpcRetryToken } ) ) using ( var stream = webResponse . GetResponseStream ( ) ) using ( var reader = new StreamReader ( stream ) ) { var response = reader . ReadToEnd ( ) ; return new CreateIdentityProviderResponse ( ) { IdentityProvider = JsonSerializer . Deserialize < IdentityProvider > ( response ) , OpcRequestId = webResponse . Headers . Get ( " " ) , ETag = webResponse . Headers . Get ( " " ) } ; } }
Creates a new identity provider in your tenancy.
Creates a new identity provider in your tenancy .
request
CreateIdentityProviderRequest