put_resource_permission_statement
async
¶
put_resource_permission_statement(
*,
config_overrides: Optional[AsyncSigninClientConfig] = None,
source_vpc: Optional[SourceVpc] = None,
signin_source_vpce: Optional[SourceVpce] = None,
console_source_vpce: Optional[SourceVpce] = None,
vpc_source_ip: Optional[VpcSourceIp] = None,
source_ip: Optional[SourceIp] = None,
requested_region: Optional[RequestedRegion] = None,
excluded_principal: Optional[ExcludedPrincipal] = None,
client_token: Optional[ClientToken] = None,
) -> PutResourcePermissionStatementOutput
Create a permission statement in the account's SignIn resource-based policy
Parameters:
-
source_vpc(Optional[SourceVpc], default:None) –VPC identifier to restrict console access
-
signin_source_vpce(Optional[SourceVpce], default:None) –SignIn VPC endpoint identifier
-
console_source_vpce(Optional[SourceVpce], default:None) –Console VPC endpoint identifier
-
vpc_source_ip(Optional[VpcSourceIp], default:None) –Source IP address within VPC
-
source_ip(Optional[SourceIp], default:None) –Source IP address
-
requested_region(Optional[RequestedRegion], default:None) –AWS region where the VPC and VPC endpoint reside Required when sourceVpc or signinSourceVpce/consoleSourceVpce is provided
-
excluded_principal(Optional[ExcludedPrincipal], default:None) –Principal to exclude from the permission statement
-
client_token(Optional[ClientToken], default:None) –Idempotency token for the request
Raises:
-
AccessDeniedException–Error thrown for access denied scenarios with flexible HTTP status mapping Runtime HTTP Status Code Mapping: - HTTP 401 (Unauthorized): TOKEN_EXPIRED, AUTHCODE_EXPIRED - HTTP 403 (Forbidden): USER_CREDENTIALS_CHANGED, INSUFFICIENT_PERMISSIONS The specific HTTP status code is determined at runtime based on the error enum value. Consumers should use the error field to determine the specific access denial reason.
-
ConflictException–Error thrown when request conflicts with current state HTTP Status Code: 409 Conflict Used when the request conflicts with the current state of the resource
-
InternalServerException–Error thrown when an internal server error occurs HTTP Status Code: 500 Internal Server Error Used for unexpected server-side errors that prevent request processing.
-
ServiceQuotaExceededException–Error thrown when service quota is exceeded HTTP Status Code: 402 Payment Required (used as quota exceeded indicator) Used when the request would cause a service quota to be exceeded
-
TooManyRequestsError–Error thrown when rate limit is exceeded HTTP Status Code: 429 Too Many Requests Possible OAuth2ErrorCode values: - INVALID_REQUEST: Rate limiting, too many requests, abuse prevention Possible causes: - Too many token requests from the same client - Rate limiting based on client_id or IP address - Abuse prevention mechanisms triggered - Service protection against excessive token generation
-
ValidationException–Error thrown when request validation fails HTTP Status Code: 400 Bad Request Used for request validation errors such as malformed parameters, missing required fields, or invalid parameter values.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_signin/_services/async_signin.py
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 | |