Skip to content

create_environment async

create_environment(
    name: EnvironmentName,
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    description: Optional[Description] = None,
    kms_key_id: Optional[KmsKeyId] = None,
    tags: Optional[TagMap] = None,
    federation_mode: Optional[FederationMode] = None,
    federation_parameters: Optional[FederationParameters] = None,
    superuser_parameters: Optional[SuperuserParameters] = None,
    data_bundles: Optional[DataBundleArns] = None,
) -> CreateEnvironmentResponse

Create a new FinSpace environment.

Parameters:

  • name (EnvironmentName) –

    The name of the FinSpace environment to be created.

  • description (Optional[Description], default: None ) –

    The description of the FinSpace environment to be created.

  • kms_key_id (Optional[KmsKeyId], default: None ) –

    The KMS key id to encrypt your data in the FinSpace environment.

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

    Add tags to your FinSpace environment.

  • federation_mode (Optional[FederationMode], default: None ) –

    Authentication mode for the environment.

    • FEDERATED - Users access FinSpace through Single Sign On (SSO) via your Identity provider.

    • LOCAL - Users access FinSpace via email and password managed within the FinSpace environment.

  • federation_parameters (Optional[FederationParameters], default: None ) –

    Configuration information when authentication mode is FEDERATED.

  • superuser_parameters (Optional[SuperuserParameters], default: None ) –

    Configuration information for the superuser.

  • data_bundles (Optional[DataBundleArns], default: None ) –

    The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:

    • arn:aws:finspace:${Region}::data-bundle/capital-markets-sample - Contains sample Capital Markets datasets, categories and controlled vocabularies.

    • arn:aws:finspace:${Region}::data-bundle/taq (default) - Contains trades and quotes data in addition to sample Capital Markets data.

Raises:

Source code in docs_src/capo_finspace/_services/async_finspace.py
async def create_environment(
    self,
    name: "capo_finspace.types.environment_name.EnvironmentName",
    *,
    config_overrides: Optional[AsyncfinspaceClientConfig] = None,
    description: Optional["capo_finspace.types.description.Description"] = None,
    kms_key_id: Optional["capo_finspace.types.kms_key_id.KmsKeyId"] = None,
    tags: Optional["capo_finspace.types.tag_map.TagMap"] = None,
    federation_mode: Optional[
        "capo_finspace.types.federation_mode.FederationMode"
    ] = None,
    federation_parameters: Optional[
        "capo_finspace.types.federation_parameters.FederationParameters"
    ] = None,
    superuser_parameters: Optional[
        "capo_finspace.types.superuser_parameters.SuperuserParameters"
    ] = None,
    data_bundles: Optional[
        "capo_finspace.types.data_bundle_arns.DataBundleArns"
    ] = None,
) -> "capo_finspace.types.create_environment_response.CreateEnvironmentResponse":
    """<p>Create a new FinSpace environment.</p>

    Args:
        name: <p>The name of the FinSpace environment to be created.</p>
        description: <p>The description of the FinSpace environment to be created.</p>
        kms_key_id: <p>The KMS key id to encrypt your data in the FinSpace environment.</p>
        tags: <p>Add tags to your FinSpace environment.</p>
        federation_mode: <p>Authentication mode for the environment.</p> <ul> <li> <p> <code>FEDERATED</code> - Users access FinSpace through Single Sign On (SSO) via your Identity provider.</p> </li> <li> <p> <code>LOCAL</code> - Users access FinSpace via email and password managed within the FinSpace environment.</p> </li> </ul>
        federation_parameters: <p>Configuration information when authentication mode is FEDERATED.</p>
        superuser_parameters: <p>Configuration information for the superuser.</p>
        data_bundles: <p>The list of Amazon Resource Names (ARN) of the data bundles to install. Currently supported data bundle ARNs:</p> <ul> <li> <p> <code>arn:aws:finspace:${Region}::data-bundle/capital-markets-sample</code> - Contains sample Capital Markets datasets, categories and controlled vocabularies.</p> </li> <li> <p> <code>arn:aws:finspace:${Region}::data-bundle/taq</code> (default) - Contains trades and quotes data in addition to sample Capital Markets data.</p> </li> </ul>

    Raises:
        capo_finspace.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_finspace.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_finspace.errors.limit_exceeded_exception.LimitExceededException: <p>A service limit or quota is exceeded.</p>
        capo_finspace.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p> You have exceeded your service quota. To perform the requested action, remove some of the relevant resources, or use Service Quotas to request a service quota increase.</p>
        capo_finspace.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_finspace.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_finspace.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_finspace.types.create_environment_request.CreateEnvironmentRequest]",
    ) -> AsyncOperationResponse[
        "capo_finspace.types.create_environment_response.CreateEnvironmentResponse"
    ]:
        import capo_finspace._operations.aws_habanero_management_service.create_environment

        (
            output,
            http_response,
        ) = await capo_finspace._operations.aws_habanero_management_service.create_environment.async_create_environment(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_finspace.types.create_environment_request.CreateEnvironmentRequest",
    ) -> dict[str, Any]:
        import capo_finspace.types.create_environment_request

        return capo_finspace.types.create_environment_request.redact_sensitive(
            input_
        )

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("CreateEnvironment", redact_input=_redact_input),
    )
    input_: capo_finspace.types.create_environment_request.CreateEnvironmentRequest = {
        "name": name
    }
    if description is not None:
        input_["description"] = description
    if kms_key_id is not None:
        input_["kms_key_id"] = kms_key_id
    if tags is not None:
        input_["tags"] = tags
    if federation_mode is not None:
        input_["federation_mode"] = federation_mode
    if federation_parameters is not None:
        input_["federation_parameters"] = federation_parameters
    if superuser_parameters is not None:
        input_["superuser_parameters"] = superuser_parameters
    if data_bundles is not None:
        input_["data_bundles"] = data_bundles

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