import { Command as $Command } from "@smithy/smithy-client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { ElasticLoadBalancingV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../ElasticLoadBalancingV2Client"; import type { ModifyRuleInput, ModifyRuleOutput } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link ModifyRuleCommand}. */ export interface ModifyRuleCommandInput extends ModifyRuleInput { } /** * @public * * The output of {@link ModifyRuleCommand}. */ export interface ModifyRuleCommandOutput extends ModifyRuleOutput, __MetadataBearer { } declare const ModifyRuleCommand_base: { new (input: ModifyRuleCommandInput): import("@smithy/smithy-client").CommandImpl; new (input: ModifyRuleCommandInput): import("@smithy/smithy-client").CommandImpl; getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions; }; /** *

Replaces the specified properties of the specified rule. Any properties that you do not * specify are unchanged.

*

To add an item to a list, remove an item from a list, or update an item in a list, you * must provide the entire list. For example, to add an action, specify a list with the current * actions plus the new action.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { ElasticLoadBalancingV2Client, ModifyRuleCommand } from "@aws-sdk/client-elastic-load-balancing-v2"; // ES Modules import * // const { ElasticLoadBalancingV2Client, ModifyRuleCommand } = require("@aws-sdk/client-elastic-load-balancing-v2"); // CommonJS import * // import type { ElasticLoadBalancingV2ClientConfig } from "@aws-sdk/client-elastic-load-balancing-v2"; * const config = {}; // type is ElasticLoadBalancingV2ClientConfig * const client = new ElasticLoadBalancingV2Client(config); * const input = { // ModifyRuleInput * RuleArn: "STRING_VALUE", // required * Conditions: [ // RuleConditionList * { // RuleCondition * Field: "STRING_VALUE", * Values: [ // ListOfString * "STRING_VALUE", * ], * HostHeaderConfig: { // HostHeaderConditionConfig * Values: [ * "STRING_VALUE", * ], * RegexValues: [ * "STRING_VALUE", * ], * }, * PathPatternConfig: { // PathPatternConditionConfig * Values: [ * "STRING_VALUE", * ], * RegexValues: [ * "STRING_VALUE", * ], * }, * HttpHeaderConfig: { // HttpHeaderConditionConfig * HttpHeaderName: "STRING_VALUE", * Values: "", * RegexValues: "", * }, * QueryStringConfig: { // QueryStringConditionConfig * Values: [ // QueryStringKeyValuePairList * { // QueryStringKeyValuePair * Key: "STRING_VALUE", * Value: "STRING_VALUE", * }, * ], * }, * HttpRequestMethodConfig: { // HttpRequestMethodConditionConfig * Values: "", * }, * SourceIpConfig: { // SourceIpConditionConfig * Values: "", * }, * RegexValues: "", * }, * ], * Actions: [ // Actions * { // Action * Type: "forward" || "authenticate-oidc" || "authenticate-cognito" || "redirect" || "fixed-response" || "jwt-validation", // required * TargetGroupArn: "STRING_VALUE", * AuthenticateOidcConfig: { // AuthenticateOidcActionConfig * Issuer: "STRING_VALUE", // required * AuthorizationEndpoint: "STRING_VALUE", // required * TokenEndpoint: "STRING_VALUE", // required * UserInfoEndpoint: "STRING_VALUE", // required * ClientId: "STRING_VALUE", // required * ClientSecret: "STRING_VALUE", * SessionCookieName: "STRING_VALUE", * Scope: "STRING_VALUE", * SessionTimeout: Number("long"), * AuthenticationRequestExtraParams: { // AuthenticateOidcActionAuthenticationRequestExtraParams * "": "STRING_VALUE", * }, * OnUnauthenticatedRequest: "deny" || "allow" || "authenticate", * UseExistingClientSecret: true || false, * }, * AuthenticateCognitoConfig: { // AuthenticateCognitoActionConfig * UserPoolArn: "STRING_VALUE", // required * UserPoolClientId: "STRING_VALUE", // required * UserPoolDomain: "STRING_VALUE", // required * SessionCookieName: "STRING_VALUE", * Scope: "STRING_VALUE", * SessionTimeout: Number("long"), * AuthenticationRequestExtraParams: { // AuthenticateCognitoActionAuthenticationRequestExtraParams * "": "STRING_VALUE", * }, * OnUnauthenticatedRequest: "deny" || "allow" || "authenticate", * }, * Order: Number("int"), * RedirectConfig: { // RedirectActionConfig * Protocol: "STRING_VALUE", * Port: "STRING_VALUE", * Host: "STRING_VALUE", * Path: "STRING_VALUE", * Query: "STRING_VALUE", * StatusCode: "HTTP_301" || "HTTP_302", // required * }, * FixedResponseConfig: { // FixedResponseActionConfig * MessageBody: "STRING_VALUE", * StatusCode: "STRING_VALUE", // required * ContentType: "STRING_VALUE", * }, * ForwardConfig: { // ForwardActionConfig * TargetGroups: [ // TargetGroupList * { // TargetGroupTuple * TargetGroupArn: "STRING_VALUE", * Weight: Number("int"), * }, * ], * TargetGroupStickinessConfig: { // TargetGroupStickinessConfig * Enabled: true || false, * DurationSeconds: Number("int"), * }, * }, * JwtValidationConfig: { // JwtValidationActionConfig * JwksEndpoint: "STRING_VALUE", // required * Issuer: "STRING_VALUE", // required * AdditionalClaims: [ // JwtValidationActionAdditionalClaims * { // JwtValidationActionAdditionalClaim * Format: "single-string" || "string-array" || "space-separated-values", // required * Name: "STRING_VALUE", // required * Values: [ // JwtValidationActionAdditionalClaimValues // required * "STRING_VALUE", * ], * }, * ], * }, * }, * ], * Transforms: [ // RuleTransformList * { // RuleTransform * Type: "host-header-rewrite" || "url-rewrite", // required * HostHeaderRewriteConfig: { // HostHeaderRewriteConfig * Rewrites: [ // RewriteConfigList * { // RewriteConfig * Regex: "STRING_VALUE", // required * Replace: "STRING_VALUE", // required * }, * ], * }, * UrlRewriteConfig: { // UrlRewriteConfig * Rewrites: [ * { * Regex: "STRING_VALUE", // required * Replace: "STRING_VALUE", // required * }, * ], * }, * }, * ], * ResetTransforms: true || false, * }; * const command = new ModifyRuleCommand(input); * const response = await client.send(command); * // { // ModifyRuleOutput * // Rules: [ // Rules * // { // Rule * // RuleArn: "STRING_VALUE", * // Priority: "STRING_VALUE", * // Conditions: [ // RuleConditionList * // { // RuleCondition * // Field: "STRING_VALUE", * // Values: [ // ListOfString * // "STRING_VALUE", * // ], * // HostHeaderConfig: { // HostHeaderConditionConfig * // Values: [ * // "STRING_VALUE", * // ], * // RegexValues: [ * // "STRING_VALUE", * // ], * // }, * // PathPatternConfig: { // PathPatternConditionConfig * // Values: [ * // "STRING_VALUE", * // ], * // RegexValues: [ * // "STRING_VALUE", * // ], * // }, * // HttpHeaderConfig: { // HttpHeaderConditionConfig * // HttpHeaderName: "STRING_VALUE", * // Values: "", * // RegexValues: "", * // }, * // QueryStringConfig: { // QueryStringConditionConfig * // Values: [ // QueryStringKeyValuePairList * // { // QueryStringKeyValuePair * // Key: "STRING_VALUE", * // Value: "STRING_VALUE", * // }, * // ], * // }, * // HttpRequestMethodConfig: { // HttpRequestMethodConditionConfig * // Values: "", * // }, * // SourceIpConfig: { // SourceIpConditionConfig * // Values: "", * // }, * // RegexValues: "", * // }, * // ], * // Actions: [ // Actions * // { // Action * // Type: "forward" || "authenticate-oidc" || "authenticate-cognito" || "redirect" || "fixed-response" || "jwt-validation", // required * // TargetGroupArn: "STRING_VALUE", * // AuthenticateOidcConfig: { // AuthenticateOidcActionConfig * // Issuer: "STRING_VALUE", // required * // AuthorizationEndpoint: "STRING_VALUE", // required * // TokenEndpoint: "STRING_VALUE", // required * // UserInfoEndpoint: "STRING_VALUE", // required * // ClientId: "STRING_VALUE", // required * // ClientSecret: "STRING_VALUE", * // SessionCookieName: "STRING_VALUE", * // Scope: "STRING_VALUE", * // SessionTimeout: Number("long"), * // AuthenticationRequestExtraParams: { // AuthenticateOidcActionAuthenticationRequestExtraParams * // "": "STRING_VALUE", * // }, * // OnUnauthenticatedRequest: "deny" || "allow" || "authenticate", * // UseExistingClientSecret: true || false, * // }, * // AuthenticateCognitoConfig: { // AuthenticateCognitoActionConfig * // UserPoolArn: "STRING_VALUE", // required * // UserPoolClientId: "STRING_VALUE", // required * // UserPoolDomain: "STRING_VALUE", // required * // SessionCookieName: "STRING_VALUE", * // Scope: "STRING_VALUE", * // SessionTimeout: Number("long"), * // AuthenticationRequestExtraParams: { // AuthenticateCognitoActionAuthenticationRequestExtraParams * // "": "STRING_VALUE", * // }, * // OnUnauthenticatedRequest: "deny" || "allow" || "authenticate", * // }, * // Order: Number("int"), * // RedirectConfig: { // RedirectActionConfig * // Protocol: "STRING_VALUE", * // Port: "STRING_VALUE", * // Host: "STRING_VALUE", * // Path: "STRING_VALUE", * // Query: "STRING_VALUE", * // StatusCode: "HTTP_301" || "HTTP_302", // required * // }, * // FixedResponseConfig: { // FixedResponseActionConfig * // MessageBody: "STRING_VALUE", * // StatusCode: "STRING_VALUE", // required * // ContentType: "STRING_VALUE", * // }, * // ForwardConfig: { // ForwardActionConfig * // TargetGroups: [ // TargetGroupList * // { // TargetGroupTuple * // TargetGroupArn: "STRING_VALUE", * // Weight: Number("int"), * // }, * // ], * // TargetGroupStickinessConfig: { // TargetGroupStickinessConfig * // Enabled: true || false, * // DurationSeconds: Number("int"), * // }, * // }, * // JwtValidationConfig: { // JwtValidationActionConfig * // JwksEndpoint: "STRING_VALUE", // required * // Issuer: "STRING_VALUE", // required * // AdditionalClaims: [ // JwtValidationActionAdditionalClaims * // { // JwtValidationActionAdditionalClaim * // Format: "single-string" || "string-array" || "space-separated-values", // required * // Name: "STRING_VALUE", // required * // Values: [ // JwtValidationActionAdditionalClaimValues // required * // "STRING_VALUE", * // ], * // }, * // ], * // }, * // }, * // ], * // IsDefault: true || false, * // Transforms: [ // RuleTransformList * // { // RuleTransform * // Type: "host-header-rewrite" || "url-rewrite", // required * // HostHeaderRewriteConfig: { // HostHeaderRewriteConfig * // Rewrites: [ // RewriteConfigList * // { // RewriteConfig * // Regex: "STRING_VALUE", // required * // Replace: "STRING_VALUE", // required * // }, * // ], * // }, * // UrlRewriteConfig: { // UrlRewriteConfig * // Rewrites: [ * // { * // Regex: "STRING_VALUE", // required * // Replace: "STRING_VALUE", // required * // }, * // ], * // }, * // }, * // ], * // }, * // ], * // }; * * ``` * * @param ModifyRuleCommandInput - {@link ModifyRuleCommandInput} * @returns {@link ModifyRuleCommandOutput} * @see {@link ModifyRuleCommandInput} for command's `input` shape. * @see {@link ModifyRuleCommandOutput} for command's `response` shape. * @see {@link ElasticLoadBalancingV2ClientResolvedConfig | config} for ElasticLoadBalancingV2Client's `config` shape. * * @throws {@link IncompatibleProtocolsException} (client fault) *

The specified configuration is not valid with this protocol.

* * @throws {@link InvalidLoadBalancerActionException} (client fault) *

The requested action is not valid.

* * @throws {@link OperationNotPermittedException} (client fault) *

This operation is not allowed.

* * @throws {@link RuleNotFoundException} (client fault) *

The specified rule does not exist.

* * @throws {@link TargetGroupAssociationLimitException} (client fault) *

You've reached the limit on the number of load balancers per target group.

* * @throws {@link TargetGroupNotFoundException} (client fault) *

The specified target group does not exist.

* * @throws {@link TooManyActionsException} (client fault) *

You've reached the limit on the number of actions per rule.

* * @throws {@link TooManyRegistrationsForTargetIdException} (client fault) *

You've reached the limit on the number of times a target can be registered with a load * balancer.

* * @throws {@link TooManyTargetsException} (client fault) *

You've reached the limit on the number of targets.

* * @throws {@link TooManyUniqueTargetGroupsPerLoadBalancerException} (client fault) *

You've reached the limit on the number of unique target groups per load balancer across * all listeners. If a target group is used by multiple actions for a load balancer, it is * counted as only one use.

* * @throws {@link UnsupportedProtocolException} (client fault) *

The specified protocol is not supported.

* * @throws {@link ElasticLoadBalancingV2ServiceException} *

Base exception class for all service exceptions from ElasticLoadBalancingV2 service.

* * * @example To modify a rule * ```javascript * // This example modifies the condition for the specified rule. * const input = { * Conditions: [ * { * Field: "path-pattern", * Values: [ * "/images/*" * ] * } * ], * RuleArn: "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee" * }; * const command = new ModifyRuleCommand(input); * const response = await client.send(command); * /* response is * { * Rules: [ * { * Actions: [ * { * TargetGroupArn: "arn:aws:elasticloadbalancing:us-west-2:123456789012:targetgroup/my-targets/73e2d6bc24d8a067", * Type: "forward" * } * ], * Conditions: [ * { * Field: "path-pattern", * Values: [ * "/images/*" * ] * } * ], * IsDefault: false, * Priority: "10", * RuleArn: "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-rule/app/my-load-balancer/50dc6c495c0c9188/f2f7dc8efc522ab2/9683b2d02a6cabee" * } * ] * } * *\/ * ``` * * @public */ export declare class ModifyRuleCommand extends ModifyRuleCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: ModifyRuleInput; output: ModifyRuleOutput; }; sdk: { input: ModifyRuleCommandInput; output: ModifyRuleCommandOutput; }; }; }