Creates a new Domain for managing HealthAgent resources.
Parameters:
-
name
(DomainName)
–
The name for the new Domain.
-
kms_key_arn
(Optional[KmsKeyArn], default:
None
)
–
The ARN of the KMS key to use for encrypting data in this Domain.
-
web_app_setup_configuration
(Optional[CreateWebAppConfiguration], default:
None
)
–
Configuration for the Domain web application. Optional, but if provided all fields are required.
-
tags
(Optional[TagMap], default:
None
)
–
Tags to associate with the Domain.
Raises:
Source code in docs_src/capo_connecthealth/_services/connect_health.py
| def create_domain(
self,
name: "capo_connecthealth.types.domain_name.DomainName",
*,
config_overrides: Optional[ConnectHealthClientConfig] = None,
kms_key_arn: Optional["capo_connecthealth.types.kms_key_arn.KmsKeyArn"] = None,
web_app_setup_configuration: Optional[
"capo_connecthealth.types.create_web_app_configuration.CreateWebAppConfiguration"
] = None,
tags: Optional["capo_connecthealth.types.tag_map.TagMap"] = None,
) -> "capo_connecthealth.types.create_domain_output.CreateDomainOutput":
"""<p>Creates a new Domain for managing HealthAgent resources.</p>
Args:
name: <p>The name for the new Domain.</p>
kms_key_arn: <p>The ARN of the KMS key to use for encrypting data in this Domain.</p>
web_app_setup_configuration: <p>Configuration for the Domain web application. Optional, but if provided all fields are required.</p>
tags: <p>Tags to associate with the Domain.</p>
Raises:
capo_connecthealth.errors.service_quota_exceeded_exception.ServiceQuotaExceededException: <p>The request exceeds a service quota.</p>
capo_connecthealth.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_connecthealth.types.create_domain_input.CreateDomainInput]",
) -> OperationResponse[
"capo_connecthealth.types.create_domain_output.CreateDomainOutput"
]:
import capo_connecthealth._operations.connect_health.create_domain
output, http_response = (
capo_connecthealth._operations.connect_health.create_domain.create_domain(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("CreateDomain")
)
input_: capo_connecthealth.types.create_domain_input.CreateDomainInput = {
"name": name
}
if kms_key_arn is not None:
input_["kms_key_arn"] = kms_key_arn
if web_app_setup_configuration is not None:
input_["web_app_setup_configuration"] = web_app_setup_configuration
if tags is not None:
input_["tags"] = tags
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|