update_component
¶
update_component(
name: ResourceName,
deployment_type: ComponentDeploymentUpdateType,
*,
config_overrides: Optional[ProtonClientConfig] = None,
description: Optional[Description] = None,
service_name: Optional[ResourceNameOrEmpty] = None,
service_instance_name: Optional[ResourceNameOrEmpty] = None,
service_spec: Optional[SpecContents] = None,
template_file: Optional[TemplateFileContents] = None,
client_token: Optional[ClientToken] = None,
) -> UpdateComponentOutput
Update a component.
There are a few modes for updating a component. The deploymentType field defines the mode.
You can't update a component while its deployment status, or the deployment status of a service instance attached to it, is IN_PROGRESS.
For more information about components, see Proton components in the Proton User Guide.
Parameters:
-
name(ResourceName) –The name of the component to update.
-
deployment_type(ComponentDeploymentUpdateType) –The deployment type. It defines the mode for updating a component, as follows:
-
NONEIn this mode, a deployment doesn't occur. Only the requested metadata parameters are updated. You can only specify
descriptionin this mode. -
CURRENT_VERSIONIn this mode, the component is deployed and updated with the new
serviceSpec,templateSource, and/ortypethat you provide. Only requested parameters are updated.
-
-
description(Optional[Description], default:None) –An optional customer-provided description of the component.
-
service_name(Optional[ResourceNameOrEmpty], default:None) –The name of the service that
serviceInstanceNameis associated with. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for bothserviceInstanceNameandserviceNameor for neither of them. -
service_instance_name(Optional[ResourceNameOrEmpty], default:None) –The name of the service instance that you want to attach this component to. Don't specify to keep the component's current service instance attachment. Specify an empty string to detach the component from the service instance it's attached to. Specify non-empty values for both
serviceInstanceNameandserviceNameor for neither of them. -
service_spec(Optional[SpecContents], default:None) –The service spec that you want the component to use to access service inputs. Set this only when the component is attached to a service instance.
-
template_file(Optional[TemplateFileContents], default:None) –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.
-
client_token(Optional[ClientToken], default:None) –The client token for the updated 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
1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 | |