enableOperatorApp method

Future<EnableOperatorAppOutput> enableOperatorApp({
  1. required String agentSpaceId,
  2. required AuthFlow authFlow,
  3. required String operatorAppRoleArn,
  4. String? idcInstanceArn,
  5. String? idpClientId,
  6. String? idpClientSecret,
  7. String? issuerUrl,
  8. String? provider,
})

Enable the Operator App to access the given AgentSpace

May throw IdentityCenterServiceException. May throw InternalServerException. May throw ThrottlingException. May throw ValidationException.

Parameter agentSpaceId : The unique identifier of the AgentSpace

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

Parameter operatorAppRoleArn : The IAM role end users assume to access AIDevOps APIs

Parameter idcInstanceArn : The IdC instance Arn used to create an IdC auth application

Parameter idpClientId : The OIDC client ID for the IdP application

Parameter idpClientSecret : The OIDC client secret for the IdP application

Parameter issuerUrl : The OIDC issuer URL of the external Identity Provider

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

Implementation

Future<EnableOperatorAppOutput> enableOperatorApp({
  required String agentSpaceId,
  required AuthFlow authFlow,
  required String operatorAppRoleArn,
  String? idcInstanceArn,
  String? idpClientId,
  String? idpClientSecret,
  String? issuerUrl,
  String? provider,
}) async {
  final $payload = <String, dynamic>{
    'authFlow': authFlow.value,
    'operatorAppRoleArn': operatorAppRoleArn,
    if (idcInstanceArn != null) 'idcInstanceArn': idcInstanceArn,
    if (idpClientId != null) 'idpClientId': idpClientId,
    if (idpClientSecret != null) 'idpClientSecret': idpClientSecret,
    if (issuerUrl != null) 'issuerUrl': issuerUrl,
    if (provider != null) 'provider': provider,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v1/agentspaces/${Uri.encodeComponent(agentSpaceId)}/operator',
    hostPrefix: 'cp.',
    exceptionFnMap: _exceptionFns,
  );
  return EnableOperatorAppOutput.fromJson(response);
}