create_service
¶
create_service(
name: ServiceName,
environment_identifier: EnvironmentId,
application_identifier: ApplicationId,
endpoint_type: ServiceEndpointType,
*,
config_overrides: Optional[MigrationHubRefactorSpacesClientConfig] = None,
description: Optional[Description] = None,
vpc_id: Optional[VpcId] = None,
url_endpoint: Optional[UrlEndpointInput] = None,
lambda_endpoint: Optional[LambdaEndpointInput] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateServiceResponse
Creates an Amazon Web Services Migration Hub Refactor Spaces service. The account owner of the service is always the environment owner, regardless of which account in the environment creates the service. Services have either a URL endpoint in a virtual private cloud (VPC), or a Lambda function endpoint.
If an Amazon Web Services resource is launched in a service VPC, and you want it to be accessible to all of an environment’s services with VPCs and routes, apply the RefactorSpacesSecurityGroup to the resource. Alternatively, to add more cross-account constraints, apply your own security group.
Parameters:
-
name(ServiceName) –The name of the service.
-
description(Optional[Description], default:None) –The description of the service.
-
environment_identifier(EnvironmentId) –The ID of the environment in which the service is created.
-
application_identifier(ApplicationId) –The ID of the application which the service is created.
-
vpc_id(Optional[VpcId], default:None) –The ID of the VPC.
-
endpoint_type(ServiceEndpointType) –The type of endpoint to use for the service. The type can be a URL in a VPC or an Lambda function.
-
url_endpoint(Optional[UrlEndpointInput], default:None) –The configuration for the URL endpoint type. When creating a route to a service, Refactor Spaces automatically resolves the address in the
UrlEndpointInputobject URL when the Domain Name System (DNS) time-to-live (TTL) expires, or every 60 seconds for TTLs less than 60 seconds. -
lambda_endpoint(Optional[LambdaEndpointInput], default:None) –The configuration for the Lambda endpoint type.
-
tags(Optional[TagMap], default:None) –The tags to assign to the service. A tag is a label that you assign to an Amazon Web Services resource. Each tag consists of a key-value pair..
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.
Raises:
-
AccessDeniedException–The user does not have sufficient access to perform this action.
-
ConflictException–Updating or deleting a resource can cause an inconsistent state.
-
InternalServerException–An unexpected error occurred while processing the request.
-
ResourceNotFoundException–The request references a resource that does not exist.
-
ServiceQuotaExceededException–The request would cause a service quota to be exceeded.
-
ThrottlingException–Request was denied because the request was throttled.
-
ValidationException–The input does not satisfy the constraints specified by an Amazon Web Service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_migration_hub_refactor_spaces/_services/migration_hub_refactor_spaces.py
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 | |