Skip to content

create_o_auth_client_application async

create_o_auth_client_application(
    aws_account_id: AwsAccountId,
    o_auth_client_application_id: OAuthClientApplicationId,
    name: ResourceName,
    o_auth_client_authentication_type: OAuthClientAuthenticationType,
    client_id: OAuthClientId,
    client_secret: OAuthClientSecret,
    o_auth_token_endpoint_url: OAuthTokenEndpointUrl,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    o_auth_authorization_endpoint_url: Optional[OAuthAuthorizationEndpointUrl] = None,
    o_auth_scopes: Optional[OAuthScopesString] = None,
    data_source_type: Optional[DataSourceType] = None,
    identity_provider_vpc_connection_properties: Optional[
        VpcConnectionProperties
    ] = None,
    tags: Optional[TagList] = None,
) -> CreateOAuthClientApplicationResponse

Creates an OAuthClientApplication.

Parameters:

  • aws_account_id (AwsAccountId) –

    The Amazon Web Services account ID.

  • o_auth_client_application_id (OAuthClientApplicationId) –

    An ID for the OAuthClientApplication that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.

  • name (ResourceName) –

    The display name for the OAuthClientApplication.

  • o_auth_client_authentication_type (OAuthClientAuthenticationType) –

    The authentication type to use for the OAuthClientApplication. This determines the OAuth 2.0 grant flow that is used when the data source connects to the identity provider. Valid values are TOKEN.

  • client_id (OAuthClientId) –

    The client ID of the OAuth application that is registered with the identity provider.

  • client_secret (OAuthClientSecret) –

    The client secret of the OAuth application that is registered with the identity provider.

  • o_auth_token_endpoint_url (OAuthTokenEndpointUrl) –

    The token endpoint URL of the identity provider that is used to obtain access tokens.

  • o_auth_authorization_endpoint_url (Optional[OAuthAuthorizationEndpointUrl], default: None ) –

    The authorization endpoint URL of the identity provider that is used to obtain authorization codes.

  • o_auth_scopes (Optional[OAuthScopesString], default: None ) –

    The OAuth scopes that are requested when the OAuthClientApplication obtains an access token from the identity provider.

  • data_source_type (Optional[DataSourceType], default: None ) –

    The type of data source that the OAuthClientApplication is used with. Valid values are SNOWFLAKE.

  • tags (Optional[TagList], default: None ) –

    Contains a map of the key-value pairs for the resource tag or tags assigned to the OAuthClientApplication.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def create_o_auth_client_application(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    o_auth_client_application_id: "capo_quicksight.types.o_auth_client_application_id.OAuthClientApplicationId",
    name: "capo_quicksight.types.resource_name.ResourceName",
    o_auth_client_authentication_type: "capo_quicksight.types.o_auth_client_authentication_type.OAuthClientAuthenticationType",
    client_id: "capo_quicksight.types.o_auth_client_id.OAuthClientId",
    client_secret: "capo_quicksight.types.o_auth_client_secret.OAuthClientSecret",
    o_auth_token_endpoint_url: "capo_quicksight.types.o_auth_token_endpoint_url.OAuthTokenEndpointUrl",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    o_auth_authorization_endpoint_url: Optional[
        "capo_quicksight.types.o_auth_authorization_endpoint_url.OAuthAuthorizationEndpointUrl"
    ] = None,
    o_auth_scopes: Optional[
        "capo_quicksight.types.o_auth_scopes_string.OAuthScopesString"
    ] = None,
    data_source_type: Optional[
        "capo_quicksight.types.data_source_type.DataSourceType"
    ] = None,
    identity_provider_vpc_connection_properties: Optional[
        "capo_quicksight.types.vpc_connection_properties.VpcConnectionProperties"
    ] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
) -> "capo_quicksight.types.create_o_auth_client_application_response.CreateOAuthClientApplicationResponse":
    """<p>Creates an OAuthClientApplication.</p>

    Args:
        aws_account_id: <p>The Amazon Web Services account ID.</p>
        o_auth_client_application_id: <p>An ID for the OAuthClientApplication that you want to create. This ID is unique per Amazon Web Services Region for each Amazon Web Services account.</p>
        name: <p>The display name for the OAuthClientApplication.</p>
        o_auth_client_authentication_type: <p>The authentication type to use for the OAuthClientApplication. This determines the OAuth 2.0 grant flow that is used when the data source connects to the identity provider. Valid values are <code>TOKEN</code>.</p>
        client_id: <p>The client ID of the OAuth application that is registered with the identity provider.</p>
        client_secret: <p>The client secret of the OAuth application that is registered with the identity provider.</p>
        o_auth_token_endpoint_url: <p>The token endpoint URL of the identity provider that is used to obtain access tokens.</p>
        o_auth_authorization_endpoint_url: <p>The authorization endpoint URL of the identity provider that is used to obtain authorization codes.</p>
        o_auth_scopes: <p>The OAuth scopes that are requested when the OAuthClientApplication obtains an access token from the identity provider.</p>
        data_source_type: <p>The type of data source that the OAuthClientApplication is used with. Valid values are <code>SNOWFLAKE</code>.</p>
        tags: <p>Contains a map of the key-value pairs for the resource tag or tags assigned to the OAuthClientApplication.</p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        capo_quicksight.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_quicksight.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_quicksight.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameters has a value that isn't valid.</p>
        capo_quicksight.errors.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.resource_exists_exception.ResourceExistsException: <p>The resource specified already exists. </p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.create_o_auth_client_application_request.CreateOAuthClientApplicationRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.create_o_auth_client_application_response.CreateOAuthClientApplicationResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_o_auth_client_application

        (
            output,
            http_response,
        ) = await capo_quicksight._operations.quick_sight_20180401.create_o_auth_client_application.async_create_o_auth_client_application(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_quicksight.types.create_o_auth_client_application_request.CreateOAuthClientApplicationRequest",
    ) -> dict[str, Any]:
        import capo_quicksight.types.create_o_auth_client_application_request

        return capo_quicksight.types.create_o_auth_client_application_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging(
            "CreateOAuthClientApplication", redact_input=_redact_input
        ),
    )
    input_: capo_quicksight.types.create_o_auth_client_application_request.CreateOAuthClientApplicationRequest = {
        "aws_account_id": aws_account_id,
        "o_auth_client_application_id": o_auth_client_application_id,
        "name": name,
        "o_auth_client_authentication_type": o_auth_client_authentication_type,
        "client_id": client_id,
        "client_secret": client_secret,
        "o_auth_token_endpoint_url": o_auth_token_endpoint_url,
    }
    if o_auth_authorization_endpoint_url is not None:
        input_["o_auth_authorization_endpoint_url"] = (
            o_auth_authorization_endpoint_url
        )
    if o_auth_scopes is not None:
        input_["o_auth_scopes"] = o_auth_scopes
    if data_source_type is not None:
        input_["data_source_type"] = data_source_type
    if identity_provider_vpc_connection_properties is not None:
        input_["identity_provider_vpc_connection_properties"] = (
            identity_provider_vpc_connection_properties
        )
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output