update_portfolio_share
¶
update_portfolio_share(
portfolio_id: Id,
*,
config_overrides: Optional[ServiceCatalogClientConfig] = None,
accept_language: Optional[AcceptLanguage] = None,
account_id: Optional[AccountId] = None,
organization_node: Optional[OrganizationNode] = None,
share_tag_options: Optional[NullableBoolean] = None,
share_principals: Optional[NullableBoolean] = None,
) -> UpdatePortfolioShareOutput
Updates the specified portfolio share. You can use this API to enable or disable TagOptions sharing or Principal sharing for an existing portfolio share.
The portfolio share cannot be updated if the CreatePortfolioShare operation is IN_PROGRESS, as the share is not available to recipient entities. In this case, you must wait for the portfolio share to be completed.
You must provide the accountId or organization node in the input, but not both.
If the portfolio is shared to both an external account and an organization node, and both shares need to be updated, you must invoke UpdatePortfolioShare separately for each share type.
This API cannot be used for removing the portfolio share. You must use DeletePortfolioShare API for that action.
When you associate a principal with portfolio, a potential privilege escalation path may occur when that portfolio is then shared with other accounts. For a user in a recipient account who is not an Service Catalog Admin, but still has the ability to create Principals (Users/Groups/Roles), that user could create a role that matches a principal name association for the portfolio. Although this user may not know which principal names are associated through Service Catalog, they may be able to guess the user. If this potential escalation path is a concern, then Service Catalog recommends using PrincipalType as IAM. With this configuration, the PrincipalARN must already exist in the recipient account before it can be associated.
Parameters:
-
accept_language(Optional[AcceptLanguage], default:None) –The language code.
-
jp- Japanese -
zh- Chinese
-
-
portfolio_id(Id) –The unique identifier of the portfolio for which the share will be updated.
-
account_id(Optional[AccountId], default:None) –The Amazon Web Services account Id of the recipient account. This field is required when updating an external account to account type share.
-
share_tag_options(Optional[NullableBoolean], default:None) –Enables or disables
TagOptionssharing for the portfolio share. If this field is not provided, the current state of TagOptions sharing on the portfolio share will not be modified. -
share_principals(Optional[NullableBoolean], default:None) –A flag to enables or disables
Principalssharing in the portfolio. If this field is not provided, the current state of thePrincipalssharing on the portfolio share will not be modified.
Raises:
-
InvalidParametersException–One or more parameters provided to the operation are not valid.
-
InvalidStateException–An attempt was made to modify a resource that is in a state that is not valid. Check your resources to ensure that they are in valid states before retrying the operation.
-
OperationNotSupportedException–The operation is not supported.
-
ResourceNotFoundException–The specified resource was not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_service_catalog/_services/service_catalog.py
6067 6068 6069 6070 6071 6072 6073 6074 6075 6076 6077 6078 6079 6080 6081 6082 6083 6084 6085 6086 6087 6088 6089 6090 6091 6092 6093 6094 6095 6096 6097 6098 6099 6100 6101 6102 6103 6104 6105 6106 6107 6108 6109 6110 6111 6112 6113 6114 6115 6116 6117 6118 6119 6120 6121 6122 6123 6124 6125 6126 6127 6128 6129 6130 6131 6132 6133 6134 6135 6136 6137 6138 6139 6140 | |