Add default url redirect to url maps (#3379) (#209)

Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
The Magician 2020-04-24 18:47:21 -04:00 committed by GitHub
commit 43e2cd9596
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1036 additions and 67 deletions

View file

@ -119,13 +119,14 @@ resources:
type: str
defaultService:
description:
- The BackendService resource to which traffic is directed if none of the hostRules
match. If defaultRouteAction is additionally specified, advanced routing actions
like URL Rewrites, etc. take effect prior to sending the request to the backend.
However, if defaultService is specified, defaultRouteAction cannot contain
any weightedBackendServices. Conversely, if routeAction specifies any weightedBackendServices,
service must not be specified. Only one of defaultService, defaultUrlRedirect
or defaultRouteAction.weightedBackendService must be set.
- The full or partial URL of the defaultService resource to which traffic is
directed if none of the hostRules match. If defaultRouteAction is additionally
specified, advanced routing actions like URL Rewrites, etc. take effect prior
to sending the request to the backend. However, if defaultService is specified,
defaultRouteAction cannot contain any weightedBackendServices. Conversely,
if routeAction specifies any weightedBackendServices, service must not be
specified. Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService
must be set.
returned: success
type: dict
description:
@ -256,20 +257,21 @@ resources:
contains:
defaultService:
description:
- 'The BackendService resource. This will be used if none of the pathRules
or routeRules defined by this PathMatcher are matched. For example, the
following are all valid URLs to a BackendService resource: - U(https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backen)
dService - compute/v1/projects/project/global/backendServices/backendService
- global/backendServices/backendService If defaultRouteAction is additionally
- 'The full or partial URL to the BackendService resource. This will be
used if none of the pathRules or routeRules defined by this PathMatcher
are matched. For example, the following are all valid URLs to a BackendService
resource: - U(https://www.googleapis.com/compute/v1/projects/project/global/backendServices/backendService)
- compute/v1/projects/project/global/backendServices/backendService -
global/backendServices/backendService If defaultRouteAction is additionally
specified, advanced routing actions like URL Rewrites, etc. take effect
prior to sending the request to the backend. However, if defaultService
is specified, defaultRouteAction cannot contain any weightedBackendServices.
Conversely, if defaultRouteAction specifies any weightedBackendServices,
defaultService must not be specified. Only one of defaultService, defaultUrlRedirect
or defaultRouteAction.weightedBackendService must be set. Authorization
requires one or more of the following Google IAM permissions on the specified
resource default_service: - compute.backendBuckets.use - compute.backendServices.use
.'
defaultService must not be specified.'
- 'Only one of defaultService, defaultUrlRedirect or defaultRouteAction.weightedBackendService
must be set. Authorization requires one or more of the following Google
IAM permissions on the specified resource defaultService: - compute.backendBuckets.use
- compute.backendServices.use .'
returned: success
type: dict
description:
@ -1562,6 +1564,71 @@ resources:
false.
returned: success
type: bool
defaultUrlRedirect:
description:
- When none of the specified hostRules match, the request is redirected
to a URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified,
defaultService or defaultRouteAction must not be set.
returned: success
type: complex
contains:
hostRedirect:
description:
- The host that will be used in the redirect response instead of the
one that was supplied in the request. The value must be between 1
and 255 characters.
returned: success
type: str
httpsRedirect:
description:
- If set to true, the URL scheme in the redirected request is set to
https. If set to false, the URL scheme of the redirected request will
remain the same as that of the request. This must only be set for
UrlMaps used in TargetHttpProxys. Setting this true for TargetHttpsProxy
is not permitted. The default is set to false.
returned: success
type: bool
pathRedirect:
description:
- The path that will be used in the redirect response instead of the
one that was supplied in the request. pathRedirect cannot be supplied
together with prefixRedirect. Supply one alone or neither. If neither
is supplied, the path of the original request will be used for the
redirect. The value must be between 1 and 1024 characters.
returned: success
type: str
prefixRedirect:
description:
- The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch,
retaining the remaining portion of the URL before redirecting the
request.
- prefixRedirect cannot be supplied together with pathRedirect. Supply
one alone or neither. If neither is supplied, the path of the original
request will be used for the redirect. The value must be between 1
and 1024 characters.
returned: success
type: str
redirectResponseCode:
description:
- 'The HTTP Status code to use for this RedirectAction. Supported values
are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds
to 301.'
- "- FOUND, which corresponds to 302."
- "- SEE_OTHER which corresponds to 303."
- "- TEMPORARY_REDIRECT, which corresponds to 307. In this case, the
request method will be retained."
- "- PERMANENT_REDIRECT, which corresponds to 308. In this case, the
request method will be retained."
returned: success
type: str
stripQuery:
description:
- If set to true, any accompanying query portion of the original URL
is removed prior to redirecting the request. If set to false, the
query portion of the original URL is retained. The default is set
to false.
returned: success
type: bool
tests:
description:
- The list of expected URL mapping tests. Request to update this UrlMap will
@ -1590,6 +1657,68 @@ resources:
- Expected BackendService resource the given URL should be mapped to.
returned: success
type: dict
defaultUrlRedirect:
description:
- When none of the specified hostRules match, the request is redirected to a
URL specified by defaultUrlRedirect. If defaultUrlRedirect is specified, defaultService
or defaultRouteAction must not be set.
returned: success
type: complex
contains:
hostRedirect:
description:
- The host that will be used in the redirect response instead of the one
that was supplied in the request. The value must be between 1 and 255
characters.
returned: success
type: str
httpsRedirect:
description:
- If set to true, the URL scheme in the redirected request is set to https.
If set to false, the URL scheme of the redirected request will remain
the same as that of the request. This must only be set for UrlMaps used
in TargetHttpProxys. Setting this true for TargetHttpsProxy is not permitted.
The default is set to false.
returned: success
type: bool
pathRedirect:
description:
- The path that will be used in the redirect response instead of the one
that was supplied in the request. pathRedirect cannot be supplied together
with prefixRedirect. Supply one alone or neither. If neither is supplied,
the path of the original request will be used for the redirect. The value
must be between 1 and 1024 characters.
returned: success
type: str
prefixRedirect:
description:
- The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch,
retaining the remaining portion of the URL before redirecting the request.
- prefixRedirect cannot be supplied together with pathRedirect. Supply one
alone or neither. If neither is supplied, the path of the original request
will be used for the redirect. The value must be between 1 and 1024 characters.
returned: success
type: str
redirectResponseCode:
description:
- 'The HTTP Status code to use for this RedirectAction. Supported values
are: - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds
to 301.'
- "- FOUND, which corresponds to 302."
- "- SEE_OTHER which corresponds to 303."
- "- TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request
method will be retained."
- "- PERMANENT_REDIRECT, which corresponds to 308. In this case, the request
method will be retained."
returned: success
type: str
stripQuery:
description:
- If set to true, any accompanying query portion of the original URL is
removed prior to redirecting the request. If set to false, the query portion
of the original URL is retained. The default is set to false.
returned: success
type: bool
'''
################################################################################