Skip to content

register_identity_provider async

register_identity_provider(
    identity_provider: IdentityProvider,
    product: str,
    *,
    config_overrides: Optional[AsyncLicenseManagerUserSubscriptionsClientConfig] = None,
    settings: Optional[Settings] = None,
    tags: Optional[Tags] = None,
) -> RegisterIdentityProviderResponse

Registers an identity provider for user-based subscriptions.

Parameters:

  • identity_provider (IdentityProvider) –

    An object that specifies details for the identity provider to register.

  • product (str) –

    The name of the user-based subscription product.

    Valid values: VISUAL_STUDIO_ENTERPRISE | VISUAL_STUDIO_PROFESSIONAL | OFFICE_PROFESSIONAL_PLUS | OFFICE_STANDARD | REMOTE_DESKTOP_SERVICES

  • settings (Optional[Settings], default: None ) –

    The registered identity provider’s product related configuration settings such as the subnets to provision VPC endpoints.

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

    The tags that apply to the identity provider's registration.

Raises:

Source code in docs_src/capo_license_manager_user_subscriptions/_services/async_license_manager_user_subscriptions.py
async def register_identity_provider(
    self,
    identity_provider: "capo_license_manager_user_subscriptions.types.identity_provider.IdentityProvider",
    product: str,
    *,
    config_overrides: Optional[
        AsyncLicenseManagerUserSubscriptionsClientConfig
    ] = None,
    settings: Optional[
        "capo_license_manager_user_subscriptions.types.settings.Settings"
    ] = None,
    tags: Optional[
        "capo_license_manager_user_subscriptions.types.tags.Tags"
    ] = None,
) -> "capo_license_manager_user_subscriptions.types.register_identity_provider_response.RegisterIdentityProviderResponse":
    """<p>Registers an identity provider for user-based subscriptions.</p>

    Args:
        identity_provider: <p>An object that specifies details for the identity provider to register.</p>
        product: <p>The name of the user-based subscription product.</p> <p>Valid values: <code>VISUAL_STUDIO_ENTERPRISE</code> | <code>VISUAL_STUDIO_PROFESSIONAL</code> | <code>OFFICE_PROFESSIONAL_PLUS</code> | <code>OFFICE_STANDARD</code> | <code>REMOTE_DESKTOP_SERVICES</code> </p>
        settings: <p>The registered identity provider’s product related configuration settings such as the subnets to provision VPC endpoints.</p>
        tags: <p>The tags that apply to the identity provider's registration.</p>

    Raises:
        capo_license_manager_user_subscriptions.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_license_manager_user_subscriptions.errors.conflict_exception.ConflictException: <p>The request couldn't be completed because it conflicted with the current state of the resource.</p>
        capo_license_manager_user_subscriptions.errors.internal_server_exception.InternalServerException: <p>An exception occurred with the service.</p>
        capo_license_manager_user_subscriptions.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource couldn't be found.</p>
        capo_license_manager_user_subscriptions.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request failed because a service quota is exceeded.</p>
        capo_license_manager_user_subscriptions.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Retry the request.</p>
        capo_license_manager_user_subscriptions.errors.validation_exception.ValidationException: <p>A parameter is not valid.</p>
        capo_license_manager_user_subscriptions.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_license_manager_user_subscriptions.types.register_identity_provider_request.RegisterIdentityProviderRequest]",
    ) -> AsyncOperationResponse[
        "capo_license_manager_user_subscriptions.types.register_identity_provider_response.RegisterIdentityProviderResponse"
    ]:
        import capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.register_identity_provider

        (
            output,
            http_response,
        ) = await capo_license_manager_user_subscriptions._operations.license_manager_user_subscriptions.register_identity_provider.async_register_identity_provider(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_license_manager_user_subscriptions.types.register_identity_provider_request.RegisterIdentityProviderRequest",
    ) -> dict[str, Any]:
        import capo_license_manager_user_subscriptions.types.register_identity_provider_request

        return capo_license_manager_user_subscriptions.types.register_identity_provider_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("RegisterIdentityProvider", redact_input=_redact_input),
    )
    input_: capo_license_manager_user_subscriptions.types.register_identity_provider_request.RegisterIdentityProviderRequest = {
        "identity_provider": identity_provider,
        "product": product,
    }
    if settings is not None:
        input_["settings"] = settings
    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