create_gateway_rule
¶
create_gateway_rule(
gateway_identifier: GatewayIdentifier,
priority: GatewayRulePriority,
actions: Actions,
*,
config_overrides: Optional[BedrockAgentCoreControlClientConfig] = None,
client_token: Optional[ClientToken] = None,
conditions: Optional[Conditions] = None,
description: Optional[GatewayRuleDescription] = None,
) -> CreateGatewayRuleResponse
Creates a rule for a gateway. Rules define conditions and actions that control how requests are routed and processed through the gateway, including principal-based access control and path-based routing.
Parameters:
-
gateway_identifier(GatewayIdentifier) –The identifier of the gateway to create a rule for.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If you don't specify this field, a value is randomly generated for you. If this token matches a previous request, the service ignores the request, but doesn't return an error. For more information, see Ensuring idempotency.
-
priority(GatewayRulePriority) –The priority of the rule. Rules are evaluated in order of priority, with lower numbers evaluated first. Must be between 1 and 1,000,000.
-
conditions(Optional[Conditions], default:None) –The conditions that must be met for the rule to apply. Conditions can match on principals (IAM ARNs) or request paths.
-
actions(Actions) –The actions to take when the rule conditions are met. Actions can route to a specific target or apply a configuration bundle override.
-
description(Optional[GatewayRuleDescription], default:None) –The description of the gateway rule.
Raises:
-
AccessDeniedException–This exception is thrown when a request is denied per access permissions
-
ConflictException–This exception is thrown when there is a conflict performing an operation
-
InternalServerException–This exception is thrown if there was an unexpected error during processing of request
-
ResourceNotFoundException–This exception is thrown when a resource referenced by the operation does not exist
-
ServiceQuotaExceededException–This exception is thrown when a request is made beyond the service quota
-
ThrottlingException–This exception is thrown when the number of requests exceeds the limit
-
ValidationException–The input fails to satisfy the constraints specified by the service.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_bedrock_agentcore_control/_services/bedrock_agent_core_control.py
6945 6946 6947 6948 6949 6950 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 6963 6964 6965 6966 6967 6968 6969 6970 6971 6972 6973 6974 6975 6976 6977 6978 6979 6980 6981 6982 6983 6984 6985 6986 6987 6988 6989 6990 6991 6992 6993 6994 6995 6996 6997 6998 6999 7000 7001 7002 7003 7004 7005 7006 7007 7008 7009 7010 7011 7012 7013 7014 7015 7016 7017 7018 7019 7020 7021 7022 7023 7024 7025 7026 7027 7028 7029 7030 7031 7032 7033 7034 7035 7036 7037 7038 7039 7040 7041 7042 | |