create_component
¶
create_component(
name: ResourceName,
template_file: TemplateFileContents,
manifest: TemplateManifestContents,
*,
config_overrides: Optional[ProtonClientConfig] = None,
description: Optional[Description] = None,
service_name: Optional[ResourceName] = None,
service_instance_name: Optional[ResourceName] = None,
environment_name: Optional[ResourceName] = None,
service_spec: Optional[SpecContents] = None,
tags: Optional[TagList] = None,
client_token: Optional[ClientToken] = None,
) -> CreateComponentOutput
Create an Proton component. A component is an infrastructure extension for a service instance.
For more information about components, see Proton components in the Proton User Guide.
Parameters:
-
name(ResourceName) –The customer-provided name of the component.
-
description(Optional[Description], default:None) –An optional customer-provided description of the component.
-
service_name(Optional[ResourceName], default:None) –The name of the service that
serviceInstanceNameis associated with. If you don't specify this, the component isn't attached to any service instance. Specify bothserviceInstanceNameandserviceNameor neither of them. -
service_instance_name(Optional[ResourceName], default:None) –The name of the service instance that you want to attach this component to. If you don't specify this, the component isn't attached to any service instance. Specify both
serviceInstanceNameandserviceNameor neither of them. -
environment_name(Optional[ResourceName], default:None) –The name of the Proton environment that you want to associate this component with. You must specify this when you don't specify
serviceInstanceNameandserviceName. -
template_file(TemplateFileContents) –A path to the Infrastructure as Code (IaC) file describing infrastructure that a custom component provisions.
Components support a single IaC file, even if you use Terraform as your template language.
-
manifest(TemplateManifestContents) –A path to a manifest file that lists the Infrastructure as Code (IaC) file, template language, and rendering engine for infrastructure that a custom component provisions.
-
service_spec(Optional[SpecContents], default:None) –The service spec that you want the component to use to access service inputs. Set this only when you attach the component to a service instance.
-
tags(Optional[TagList], default:None) –An optional list of metadata items that you can associate with the Proton component. A tag is a key-value pair.
For more information, see Proton resources and tagging in the Proton User Guide.
-
client_token(Optional[ClientToken], default:None) –The client token for the created component.
Raises:
-
AccessDeniedException–There isn't sufficient access for performing this action.
-
ConflictException–The request couldn't be made due to a conflicting operation or resource.
-
InternalServerException–The request failed to register with the service.
-
ResourceNotFoundException–The requested resource wasn't found.
-
ServiceQuotaExceededException–A quota was exceeded. For more information, see Proton Quotas in the Proton User Guide.
-
ThrottlingException–The request was denied due to request throttling.
-
ValidationException–The input is invalid or an out-of-range value was supplied for the input parameter.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_proton/_services/proton.py
1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 | |