update_portfolio_share
async
¶
update_portfolio_share(
portfolio_id: Id,
*,
config_overrides: Optional[AsyncServiceCatalogClientConfig] = 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/async_service_catalog.py
6150 6151 6152 6153 6154 6155 6156 6157 6158 6159 6160 6161 6162 6163 6164 6165 6166 6167 6168 6169 6170 6171 6172 6173 6174 6175 6176 6177 6178 6179 6180 6181 6182 6183 6184 6185 6186 6187 6188 6189 6190 6191 6192 6193 6194 6195 6196 6197 6198 6199 6200 6201 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 | |