Skip to content

Modify Rule

elbv2_modify_rule R Documentation

Replaces the specified properties of the specified rule

Description

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.

Usage

elbv2_modify_rule(RuleArn, Conditions, Actions, Transforms,
  ResetTransforms)

Arguments

RuleArn

[required] The Amazon Resource Name (ARN) of the rule.

Conditions

The conditions.

Actions

The actions.

Transforms

The transforms to apply to requests that match this rule. You can add one host header rewrite transform and one URL rewrite transform. If you specify Transforms, you can't specify ResetTransforms.

ResetTransforms

Indicates whether to remove all transforms from the rule. If you specify ResetTransforms, you can't specify Transforms.

Value

A list with the following syntax:

list(
  Rules = list(
    list(
      RuleArn = "string",
      Priority = "string",
      Conditions = list(
        list(
          Field = "string",
          Values = list(
            "string"
          ),
          HostHeaderConfig = list(
            Values = list(
              "string"
            ),
            RegexValues = list(
              "string"
            )
          ),
          PathPatternConfig = list(
            Values = list(
              "string"
            ),
            RegexValues = list(
              "string"
            )
          ),
          HttpHeaderConfig = list(
            HttpHeaderName = "string",
            Values = list(
              "string"
            ),
            RegexValues = list(
              "string"
            )
          ),
          QueryStringConfig = list(
            Values = list(
              list(
                Key = "string",
                Value = "string"
              )
            )
          ),
          HttpRequestMethodConfig = list(
            Values = list(
              "string"
            )
          ),
          SourceIpConfig = list(
            Values = list(
              "string"
            )
          ),
          RegexValues = list(
            "string"
          )
        )
      ),
      Actions = list(
        list(
          Type = "forward"|"authenticate-oidc"|"authenticate-cognito"|"redirect"|"fixed-response"|"jwt-validation",
          TargetGroupArn = "string",
          AuthenticateOidcConfig = list(
            Issuer = "string",
            AuthorizationEndpoint = "string",
            TokenEndpoint = "string",
            UserInfoEndpoint = "string",
            ClientId = "string",
            ClientSecret = "string",
            SessionCookieName = "string",
            Scope = "string",
            SessionTimeout = 123,
            AuthenticationRequestExtraParams = list(
              "string"
            ),
            OnUnauthenticatedRequest = "deny"|"allow"|"authenticate",
            UseExistingClientSecret = TRUE|FALSE
          ),
          AuthenticateCognitoConfig = list(
            UserPoolArn = "string",
            UserPoolClientId = "string",
            UserPoolDomain = "string",
            SessionCookieName = "string",
            Scope = "string",
            SessionTimeout = 123,
            AuthenticationRequestExtraParams = list(
              "string"
            ),
            OnUnauthenticatedRequest = "deny"|"allow"|"authenticate"
          ),
          Order = 123,
          RedirectConfig = list(
            Protocol = "string",
            Port = "string",
            Host = "string",
            Path = "string",
            Query = "string",
            StatusCode = "HTTP_301"|"HTTP_302"
          ),
          FixedResponseConfig = list(
            MessageBody = "string",
            StatusCode = "string",
            ContentType = "string"
          ),
          ForwardConfig = list(
            TargetGroups = list(
              list(
                TargetGroupArn = "string",
                Weight = 123
              )
            ),
            TargetGroupStickinessConfig = list(
              Enabled = TRUE|FALSE,
              DurationSeconds = 123
            )
          ),
          JwtValidationConfig = list(
            JwksEndpoint = "string",
            Issuer = "string",
            AdditionalClaims = list(
              list(
                Format = "single-string"|"string-array"|"space-separated-values",
                Name = "string",
                Values = list(
                  "string"
                )
              )
            )
          )
        )
      ),
      IsDefault = TRUE|FALSE,
      Transforms = list(
        list(
          Type = "host-header-rewrite"|"url-rewrite",
          HostHeaderRewriteConfig = list(
            Rewrites = list(
              list(
                Regex = "string",
                Replace = "string"
              )
            )
          ),
          UrlRewriteConfig = list(
            Rewrites = list(
              list(
                Regex = "string",
                Replace = "string"
              )
            )
          )
        )
      )
    )
  )
)

Request syntax

svc$modify_rule(
  RuleArn = "string",
  Conditions = list(
    list(
      Field = "string",
      Values = list(
        "string"
      ),
      HostHeaderConfig = list(
        Values = list(
          "string"
        ),
        RegexValues = list(
          "string"
        )
      ),
      PathPatternConfig = list(
        Values = list(
          "string"
        ),
        RegexValues = list(
          "string"
        )
      ),
      HttpHeaderConfig = list(
        HttpHeaderName = "string",
        Values = list(
          "string"
        ),
        RegexValues = list(
          "string"
        )
      ),
      QueryStringConfig = list(
        Values = list(
          list(
            Key = "string",
            Value = "string"
          )
        )
      ),
      HttpRequestMethodConfig = list(
        Values = list(
          "string"
        )
      ),
      SourceIpConfig = list(
        Values = list(
          "string"
        )
      ),
      RegexValues = list(
        "string"
      )
    )
  ),
  Actions = list(
    list(
      Type = "forward"|"authenticate-oidc"|"authenticate-cognito"|"redirect"|"fixed-response"|"jwt-validation",
      TargetGroupArn = "string",
      AuthenticateOidcConfig = list(
        Issuer = "string",
        AuthorizationEndpoint = "string",
        TokenEndpoint = "string",
        UserInfoEndpoint = "string",
        ClientId = "string",
        ClientSecret = "string",
        SessionCookieName = "string",
        Scope = "string",
        SessionTimeout = 123,
        AuthenticationRequestExtraParams = list(
          "string"
        ),
        OnUnauthenticatedRequest = "deny"|"allow"|"authenticate",
        UseExistingClientSecret = TRUE|FALSE
      ),
      AuthenticateCognitoConfig = list(
        UserPoolArn = "string",
        UserPoolClientId = "string",
        UserPoolDomain = "string",
        SessionCookieName = "string",
        Scope = "string",
        SessionTimeout = 123,
        AuthenticationRequestExtraParams = list(
          "string"
        ),
        OnUnauthenticatedRequest = "deny"|"allow"|"authenticate"
      ),
      Order = 123,
      RedirectConfig = list(
        Protocol = "string",
        Port = "string",
        Host = "string",
        Path = "string",
        Query = "string",
        StatusCode = "HTTP_301"|"HTTP_302"
      ),
      FixedResponseConfig = list(
        MessageBody = "string",
        StatusCode = "string",
        ContentType = "string"
      ),
      ForwardConfig = list(
        TargetGroups = list(
          list(
            TargetGroupArn = "string",
            Weight = 123
          )
        ),
        TargetGroupStickinessConfig = list(
          Enabled = TRUE|FALSE,
          DurationSeconds = 123
        )
      ),
      JwtValidationConfig = list(
        JwksEndpoint = "string",
        Issuer = "string",
        AdditionalClaims = list(
          list(
            Format = "single-string"|"string-array"|"space-separated-values",
            Name = "string",
            Values = list(
              "string"
            )
          )
        )
      )
    )
  ),
  Transforms = list(
    list(
      Type = "host-header-rewrite"|"url-rewrite",
      HostHeaderRewriteConfig = list(
        Rewrites = list(
          list(
            Regex = "string",
            Replace = "string"
          )
        )
      ),
      UrlRewriteConfig = list(
        Rewrites = list(
          list(
            Regex = "string",
            Replace = "string"
          )
        )
      )
    )
  ),
  ResetTransforms = TRUE|FALSE
)

Examples

## Not run: 
# This example modifies the condition for the specified rule.
svc$modify_rule(
  Conditions = list(
    list(
      Field = "path-pattern",
      Values = list(
        "/images/*"
      )
    )
  ),
  RuleArn = "arn:aws:elasticloadbalancing:us-west-2:123456789012:listener-r..."
)

## End(Not run)