Skip to content

enable_operator_app async

enable_operator_app(
    agent_space_id: AgentSpaceId,
    auth_flow: AuthFlow,
    operator_app_role_arn: RoleArn,
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    idc_instance_arn: Optional[str] = None,
    issuer_url: Optional[str] = None,
    idp_client_id: Optional[IdpClientId] = None,
    idp_client_secret: Optional[IdpClientSecret] = None,
    provider: Optional[str] = None,
) -> EnableOperatorAppOutput

Enable the Operator App to access the given AgentSpace

Parameters:

  • agent_space_id (AgentSpaceId) –

    The unique identifier of the AgentSpace

  • auth_flow (AuthFlow) –

    The authentication flow configured for the operator App. e.g. iam or idc

  • operator_app_role_arn (RoleArn) –

    The IAM role end users assume to access AIDevOps APIs

  • idc_instance_arn (Optional[str], default: None ) –

    The IdC instance Arn used to create an IdC auth application

  • issuer_url (Optional[str], default: None ) –

    The OIDC issuer URL of the external Identity Provider

  • idp_client_id (Optional[IdpClientId], default: None ) –

    The OIDC client ID for the IdP application

  • idp_client_secret (Optional[IdpClientSecret], default: None ) –

    The OIDC client secret for the IdP application

  • provider (Optional[str], default: None ) –

    The Identity Provider name (e.g., Entra, Okta, Google)

Raises:

Source code in docs_src/capo_devops_agent/_services/async_dev_ops_agent.py
async def enable_operator_app(
    self,
    agent_space_id: "capo_devops_agent.types.agent_space_id.AgentSpaceId",
    auth_flow: "capo_devops_agent.types.auth_flow.AuthFlow",
    operator_app_role_arn: "capo_devops_agent.types.role_arn.RoleArn",
    *,
    config_overrides: Optional[AsyncDevOpsAgentClientConfig] = None,
    idc_instance_arn: Optional[str] = None,
    issuer_url: Optional[str] = None,
    idp_client_id: Optional[
        "capo_devops_agent.types.idp_client_id.IdpClientId"
    ] = None,
    idp_client_secret: Optional[
        "capo_devops_agent.types.idp_client_secret.IdpClientSecret"
    ] = None,
    provider: Optional[str] = None,
) -> "capo_devops_agent.types.enable_operator_app_output.EnableOperatorAppOutput":
    """<p>Enable the Operator App to access the given AgentSpace</p>

    Args:
        agent_space_id: <p>The unique identifier of the AgentSpace</p>
        auth_flow: <p>The authentication flow configured for the operator App. e.g. iam or idc</p>
        operator_app_role_arn: <p>The IAM role end users assume to access AIDevOps APIs</p>
        idc_instance_arn: <p>The IdC instance Arn used to create an IdC auth application</p>
        issuer_url: <p>The OIDC issuer URL of the external Identity Provider</p>
        idp_client_id: <p>The OIDC client ID for the IdP application</p>
        idp_client_secret: <p>The OIDC client secret for the IdP application</p>
        provider: <p>The Identity Provider name (e.g., Entra, Okta, Google)</p>

    Raises:
        capo_devops_agent.errors.access_denied_exception.AccessDeniedException: <p>Access to the requested resource is denied due to insufficient permissions.</p>
        capo_devops_agent.errors.conflict_exception.ConflictException: <p>The request conflicts with the current state of the resource.</p>
        capo_devops_agent.errors.content_size_exceeded_exception.ContentSizeExceededException: <p>This exception is thrown when the content size exceeds the allowed limit.</p>
        capo_devops_agent.errors.internal_server_exception.InternalServerException: <p>This exception is thrown when an unexpected error occurs in the processing of a request.</p>
        capo_devops_agent.errors.invalid_parameter_exception.InvalidParameterException: <p>One or more parameters provided in the request are invalid.</p>
        capo_devops_agent.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found.</p>
        capo_devops_agent.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request would exceed the service quota limit.</p>
        capo_devops_agent.errors.throttling_exception.ThrottlingException: <p>The request was throttled due to too many requests. Please slow down and try again.</p>
        capo_devops_agent.errors.identity_center_service_exception.IdentityCenterServiceException: <p>Calls to the customer Identity Center have failed</p>
        capo_devops_agent.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the service.</p>
        capo_devops_agent.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_devops_agent.types.enable_operator_app_input.EnableOperatorAppInput]",
    ) -> AsyncOperationResponse[
        "capo_devops_agent.types.enable_operator_app_output.EnableOperatorAppOutput"
    ]:
        import capo_devops_agent._operations.dev_ops_agent.enable_operator_app

        (
            output,
            http_response,
        ) = await capo_devops_agent._operations.dev_ops_agent.enable_operator_app.async_enable_operator_app(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_devops_agent.types.enable_operator_app_input.EnableOperatorAppInput",
    ) -> dict[str, Any]:
        import capo_devops_agent.types.enable_operator_app_input

        return capo_devops_agent.types.enable_operator_app_input.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("EnableOperatorApp", redact_input=_redact_input),
    )
    input_: capo_devops_agent.types.enable_operator_app_input.EnableOperatorAppInput = {
        "agent_space_id": agent_space_id,
        "auth_flow": auth_flow,
        "operator_app_role_arn": operator_app_role_arn,
    }
    if idc_instance_arn is not None:
        input_["idc_instance_arn"] = idc_instance_arn
    if issuer_url is not None:
        input_["issuer_url"] = issuer_url
    if idp_client_id is not None:
        input_["idp_client_id"] = idp_client_id
    if idp_client_secret is not None:
        input_["idp_client_secret"] = idp_client_secret
    if provider is not None:
        input_["provider"] = provider

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