Updates one or more account customization settings. You can update account color, visible services, and visible Regions in a single request. Only the settings that you include in the request body are modified. Omitted settings remain unchanged. To reset a setting to its default behavior, set the value to null for visible Regions and visible services, or none for account color. This operation is idempotent.
The visibleServices and visibleRegions settings control only the appearance of services and Regions in the Amazon Web Services Management Console. They do not restrict access through the CLI, SDKs, or other APIs.
Parameters:
-
account_color
(Optional[AccountColor], default:
None
)
–
The account color preference to set. Set to none to reset to the default (no color).
-
visible_services
(Optional[ServiceList], default:
None
)
–
The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to null to reset to the default, which makes all services visible. For valid service identifiers, call ListServices.
-
visible_regions
(Optional[RegionsList], default:
None
)
–
The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to null to reset to the default, which makes all Regions visible. For a list of valid Region codes, see Amazon Web Services Regions.
Raises:
Examples:
Update account customizations
Updates account customization settings with new values
>>> await client.update_account_customizations(account_color='green', visible_services=['s3', 'ec2', 'lambda'])
Source code in docs_src/capo_uxc/_services/async_uxc.py
| async def update_account_customizations(
self,
*,
config_overrides: Optional[AsyncuxcClientConfig] = None,
account_color: Optional["capo_uxc.types.account_color.AccountColor"] = None,
visible_services: Optional["capo_uxc.types.service_list.ServiceList"] = None,
visible_regions: Optional["capo_uxc.types.regions_list.RegionsList"] = None,
) -> "capo_uxc.types.update_account_customizations_output.UpdateAccountCustomizationsOutput":
"""<p>Updates one or more account customization settings. You can update account color, visible services, and visible Regions in a single request. Only the settings that you include in the request body are modified. Omitted settings remain unchanged. To reset a setting to its default behavior, set the value to <code>null</code> for visible Regions and visible services, or <code>none</code> for account color. This operation is idempotent.</p> <note> <p>The <code>visibleServices</code> and <code>visibleRegions</code> settings control only the appearance of services and Regions in the Amazon Web Services Management Console. They do not restrict access through the CLI, SDKs, or other APIs.</p> </note>
Args:
account_color: <p>The account color preference to set. Set to <code>none</code> to reset to the default (no color).</p>
visible_services: <p>The list of Amazon Web Services service identifiers to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all services visible. For valid service identifiers, call <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
visible_regions: <p>The list of Amazon Web Services Region codes to make visible in the Amazon Web Services Management Console. Set to <code>null</code> to reset to the default, which makes all Regions visible. For a list of valid Region codes, see <a href="https://docs.aws.amazon.com/global-infrastructure/latest/regions/aws-regions.html">Amazon Web Services Regions</a>.</p>
Raises:
capo_uxc.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this operation. Verify that your IAM policy includes the required <code>uxc:</code> permissions for the operation that you are calling. For more information on IAM permissions, see <a href="https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/security-iam-awsmanpol.html">Amazon Web Services managed policies for Amazon Web Services Management Console</a>.</p>
capo_uxc.errors.internal_server_exception.InternalServerException: <p>The service encountered an internal error. Try your request again later.</p>
capo_uxc.errors.throttling_exception.ThrottlingException: <p>The request was denied because of request throttling. Reduce the frequency of your requests.</p>
capo_uxc.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service.</p>
capo_uxc.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Update account customizations
Updates account customization settings with new values
>>> await client.update_account_customizations(account_color='green', visible_services=['s3', 'ec2', 'lambda'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_uxc.types.update_account_customizations_input.UpdateAccountCustomizationsInput]",
) -> AsyncOperationResponse[
"capo_uxc.types.update_account_customizations_output.UpdateAccountCustomizationsOutput"
]:
import capo_uxc._operations.aws_account_ux_setting.update_account_customizations
(
output,
http_response,
) = await capo_uxc._operations.aws_account_ux_setting.update_account_customizations.async_update_account_customizations(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateAccountCustomizations")
)
input_: capo_uxc.types.update_account_customizations_input.UpdateAccountCustomizationsInput = {}
if account_color is not None:
input_["account_color"] = account_color
if visible_services is not None:
input_["visible_services"] = visible_services
if visible_regions is not None:
input_["visible_regions"] = visible_regions
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|