diff --git a/docs/resources/google_compute_disk.md b/docs/resources/google_compute_disk.md index 8b0041bc9..189f06a98 100644 --- a/docs/resources/google_compute_disk.md +++ b/docs/resources/google_compute_disk.md @@ -81,7 +81,7 @@ Properties that can be accessed from the `google_compute_disk` resource: * `sha256`: The RFC 4648 base64 encoded SHA-256 hash of the customer-supplied encryption key that protects this resource. - * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. + * `kms_key_name`: The name of the encryption key that is stored in Google Cloud KMS. Your project's Compute Engine System service account (`service-{{PROJECT_NUMBER}}@compute-system.iam.gserviceaccount.com`) must have `roles/cloudkms.cryptoKeyEncrypterDecrypter` to use this feature. * `source_snapshot`: The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. If the snapshot is in another project than this disk, you must supply a full URL. For example, the following are valid values: * `https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot` * `projects/project/global/snapshots/snapshot` * `global/snapshots/snapshot` diff --git a/docs/resources/google_compute_target_https_proxy.md b/docs/resources/google_compute_target_https_proxy.md index 0b85b706e..59b8d8eed 100644 --- a/docs/resources/google_compute_target_https_proxy.md +++ b/docs/resources/google_compute_target_https_proxy.md @@ -33,7 +33,7 @@ Properties that can be accessed from the `google_compute_target_https_proxy` res * `quic_override`: Specifies the QUIC override policy for this resource. This determines whether the load balancer will attempt to negotiate QUIC with clients or not. Can specify one of NONE, ENABLE, or DISABLE. If NONE is specified, uses the QUIC policy with no user overrides, which is equivalent to DISABLE. Not specifying this field is equivalent to specifying NONE. - * `ssl_certificates`: A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. Currently, exactly one SSL certificate must be specified. + * `ssl_certificates`: A list of SslCertificate resources that are used to authenticate connections between users and the load balancer. At least one SSL certificate must be specified. * `ssl_policy`: A reference to the SslPolicy resource that will be associated with the TargetHttpsProxy resource. If not set, the TargetHttpsProxy resource will not have any SSL policy configured. diff --git a/docs/resources/google_compute_url_map.md b/docs/resources/google_compute_url_map.md index b00cd0e1c..2f39c2dc6 100644 --- a/docs/resources/google_compute_url_map.md +++ b/docs/resources/google_compute_url_map.md @@ -32,39 +32,379 @@ Properties that can be accessed from the `google_compute_url_map` resource: * `creation_timestamp`: Creation timestamp in RFC3339 text format. - * `default_service`: A reference to BackendService resource if none of the hostRules match. + * `default_service`: 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. * `description`: An optional description of this resource. Provide this property when you create the resource. + * `id`: The unique identifier for the resource. + + * `fingerprint`: Fingerprint of this resource. A hash of the contents stored in this object. This field is used in optimistic locking. + + * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here take effect after headerAction specified under pathMatcher. + + * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. + + * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. + * `host_rules`: The list of HostRules to use against the URL. - * `description`: An optional description of this HostRule. Provide this property when you create the resource. + * `description`: An optional description of this resource. Provide this property when you create the resource. * `hosts`: The list of host patterns to match. They must be valid hostnames, except * will match any string of ([a-z0-9-.]*). In that case, * must be the first character and must be followed in the pattern by either - or .. * `path_matcher`: The name of the PathMatcher to use to match the path portion of the URL if the hostRule matches the URL's host portion. - * `id`: The unique identifier for the resource. - - * `fingerprint`: Fingerprint of this resource. This field is used internally during updates of this resource. - * `name`: Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. * `path_matchers`: The list of named PathMatchers to use against the URL. - * `default_service`: A reference to a BackendService resource. This will be used if none of the pathRules defined by this PathMatcher is matched by the URL's path portion. + * `default_service`: 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: - 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 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 + + * `description`: An optional description of this resource. Provide this property when you create the resource. + + * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. HeaderAction specified here are applied after the matching HttpRouteRule HeaderAction and before the HeaderAction in the UrlMap + + * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. - * `description`: An optional description of this resource. + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. + + * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. * `name`: The name to which this PathMatcher is referred by the HostRule. - * `path_rules`: The list of path rules. + * `path_rules`: The list of path rules. Use this list instead of routeRules when routing based on simple path matching is all that's required. The order by which path rules are specified does not matter. Matches are always done on the longest-path-first basis. For example: a pathRule with a path /a/b/c/* will match before /a/b/* irrespective of the order in which those paths appear in this list. Within a given pathMatcher, only one of pathRules or routeRules must be set. + + * `service`: The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. * `paths`: The list of path patterns to match. Each must start with / and the only place a * is allowed is at the end following a /. The string fed to the path matcher does not include any text after the first ? or #, and those chars are not allowed here. - * `service`: A reference to the BackendService resource if this rule is matched. + * `route_action`: In response to a matching path, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. + + * `cors_policy`: The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing + + * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. + + * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. + + * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. + + * `allow_origin_regexes`: Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex. + + * `allow_origins`: Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex. + + * `disabled`: If true, specifies the CORS policy is disabled. + + * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. + + * `max_age`: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. + + * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. + + * `abort`: The specification for how client requests are aborted as part of fault injection. + + * `http_status`: The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. + + * `percentage`: The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. + + * `delay`: The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. + + * `fixed_delay`: Specifies the value of the fixed delay interval. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `percentage`: The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. + + * `request_mirror_policy`: Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. + + * `backend_service`: The BackendService resource being mirrored to. + + * `retry_policy`: Specifies the retry policy associated with this route. + + * `num_retries`: Specifies the allowed number retries. This number must be > 0. + + * `per_try_timeout`: Specifies a non-zero timeout per retry attempt. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `retry_conditions`: Specifies one or more conditions when this retry rule applies. Valid values are: - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. - refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable + + * `timeout`: Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `url_rewrite`: The spec to modify the URL of the request, prior to forwarding the request to the matched service + + * `host_rewrite`: Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. + + * `path_prefix_rewrite`: Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. + + * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. + + * `backend_service`: The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. + + * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. + + * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. + + * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. + + * `weight`: Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 + + * `url_redirect`: When a path pattern is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. + + * `host_redirect`: 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. + + * `https_redirect`: 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. Defaults to false. + + * `path_redirect`: The path that will be used in the redirect response instead of the one that was supplied in the request. Only one of pathRedirect or prefixRedirect must be specified. The value must be between 1 and 1024 characters. + + * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. + + * `redirect_response_code`: 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. + + * `strip_query`: 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. + + * `route_rules`: The list of ordered HTTP route rules. Use this list instead of pathRules when advanced route matching and routing actions are desired. The order of specifying routeRules matters: the first rule that matches will cause its specified routing action to take effect. Within a given pathMatcher, only one of pathRules or routeRules must be set. routeRules are not supported in UrlMaps intended for External load balancers. + + * `priority`: For routeRules within a given pathMatcher, priority determines the order in which load balancer will interpret routeRules. RouteRules are evaluated in order of priority, from the lowest to highest number. The priority of a rule decreases as its number increases (1, 2, 3, N+1). The first rule that matches the request is applied. You cannot configure two or more routeRules with the same priority. Priority for each rule must be set to a number between 0 and 2147483647 inclusive. Priority numbers can have gaps, which enable you to add or remove rules in the future without affecting the rest of the rules. For example, 1, 2, 3, 4, 5, 9, 12, 16 is a valid series of priority numbers to which you could add rules numbered from 6 to 8, 10 to 11, and 13 to 15 in the future without any impact on existing rules. + + * `service`: The backend service resource to which traffic is directed if this rule is matched. If routeAction is additionally specified, advanced routing actions like URL Rewrites, etc. take effect prior to sending the request to the backend. However, if service is specified, routeAction cannot contain any weightedBackendService s. Conversely, if routeAction specifies any weightedBackendServices, service must not be specified. Only one of urlRedirect, service or routeAction.weightedBackendService must be set. + + * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. The headerAction specified here are applied before the matching pathMatchers[].headerAction and after pathMatchers[].routeRules[].r outeAction.weightedBackendService.backendServiceWeightAction[].headerAction + + * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. + + * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. + + * `match_rules`: The rules for determining a match. + + * `full_path_match`: For satifying the matchRule condition, the path of the request must exactly match the value specified in fullPathMatch after removing any query parameters and anchor that may be part of the original URL. FullPathMatch must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. + + * `header_matches`: Specifies a list of header match criteria, all of which must match corresponding headers in the request. + + * `exact_match`: The value should exactly match contents of exactMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `header_name`: The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name ":authority". For matching a request's method, use the headerName ":method". + + * `invert_match`: If set to false, the headerMatch is considered a match if the match criteria above are met. If set to true, the headerMatch is considered a match if the match criteria above are NOT met. Defaults to false. + + * `prefix_match`: The value of the header must start with the contents of prefixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `present_match`: A header with the contents of headerName must exist. The match takes place whether or not the request's header has a value or not. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `range_match`: The header value must be an integer and its value must be in the range specified in rangeMatch. If the header does not contain an integer, number or is empty, the match fails. For example for a range [-5, 0] - -3 will match. - 0 will not match. - 0.25 will not match. - -3someString will not match. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `range_end`: The end of the range (exclusive). + + * `range_start`: The start of the range (inclusive). + + * `regex_match`: The value of the header must match the regualar expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to PORT and a regular expression that satisfies the RFC2616 Host header's port specifier. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `suffix_match`: The value of the header must end with the contents of suffixMatch. Only one of exactMatch, prefixMatch, suffixMatch, regexMatch, presentMatch or rangeMatch must be set. + + * `ignore_case`: Specifies that prefixMatch and fullPathMatch matches are case sensitive. Defaults to false. + + * `metadata_filters`: Opaque filter criteria used by Loadbalancer to restrict routing configuration to a limited set xDS compliant clients. In their xDS requests to Loadbalancer, xDS clients present node metadata. If a match takes place, the relevant routing configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels in the provided metadata. metadataFilters specified here can be overrides those specified in ForwardingRule that refers to this UrlMap. metadataFilters only applies to Loadbalancers that have their loadBalancingScheme set to INTERNAL_SELF_MANAGED. + + * `filter_labels`: The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries. + + * `name`: Name of metadata label. The name can have a maximum length of 1024 characters and must be at least 1 character long. + + * `value`: The value of the label must match the specified value. value can have a maximum length of 1024 characters. + + * `filter_match_criteria`: Specifies how individual filterLabel matches within the list of filterLabels contribute towards the overall metadataFilter match. Supported values are: - MATCH_ANY: At least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: All filterLabels must have matching labels in the provided metadata. + + * `prefix_match`: For satifying the matchRule condition, the request's path must begin with the specified prefixMatch. prefixMatch must begin with a /. The value must be between 1 and 1024 characters. Only one of prefixMatch, fullPathMatch or regexMatch must be specified. + + * `query_parameter_matches`: Specifies a list of query parameter match criteria, all of which must match corresponding query parameters in the request. + + * `exact_match`: The queryParameterMatch matches if the value of the parameter exactly matches the contents of exactMatch. Only one of presentMatch, exactMatch and regexMatch must be set. + + * `name`: The name of the query parameter to match. The query parameter must exist in the request, in the absence of which the request match fails. + + * `present_match`: Specifies that the queryParameterMatch matches if the request contains the query parameter, irrespective of whether the parameter has a value or not. Only one of presentMatch, exactMatch and regexMatch must be set. + + * `regex_match`: The queryParameterMatch matches if the value of the parameter matches the regular expression specified by regexMatch. For the regular expression grammar, please see en.cppreference.com/w/cpp/regex/ecmascript Only one of presentMatch, exactMatch and regexMatch must be set. + + * `regex_match`: For satifying the matchRule condition, the path of the request must satisfy the regular expression specified in regexMatch after removing any query parameters and anchor supplied with the original URL. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript Only one of prefixMatch, fullPathMatch or regexMatch must be specified. + + * `route_action`: In response to a matching matchRule, the load balancer performs advanced routing actions like URL rewrites, header transformations, etc. prior to forwarding the request to the selected backend. If routeAction specifies any weightedBackendServices, service must not be set. Conversely if service is set, routeAction cannot contain any weightedBackendServices. Only one of routeAction or urlRedirect must be set. + + * `cors_policy`: The specification for allowing client side cross-origin requests. Please see W3C Recommendation for Cross Origin Resource Sharing + + * `allow_credentials`: In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access- Control-Allow-Credentials header. Defaults to false. + + * `allow_headers`: Specifies the content for the Access-Control-Allow-Headers header. + + * `allow_methods`: Specifies the content for the Access-Control-Allow-Methods header. + + * `allow_origin_regexes`: Specifies the regualar expression patterns that match allowed origins. For regular expression grammar please see en.cppreference.com/w/cpp/regex/ecmascript An origin is allowed if it matches either allow_origins or allow_origin_regex. + + * `allow_origins`: Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either allow_origins or allow_origin_regex. + + * `disabled`: If true, specifies the CORS policy is disabled. which indicates that the CORS policy is in effect. Defaults to false. + + * `expose_headers`: Specifies the content for the Access-Control-Expose-Headers header. + + * `max_age`: Specifies how long the results of a preflight request can be cached. This translates to the content for the Access-Control-Max-Age header. + + * `fault_injection_policy`: The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced by Loadbalancer on a percentage of requests before sending those request to the backend service. Similarly requests from clients can be aborted by the Loadbalancer for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy. + + * `abort`: The specification for how client requests are aborted as part of fault injection. + + * `http_status`: The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive. + + * `percentage`: The percentage of traffic (connections/operations/requests) which will be aborted as part of fault injection. The value must be between 0.0 and 100.0 inclusive. + + * `delay`: The specification for how client requests are delayed as part of fault injection, before being sent to a backend service. + + * `fixed_delay`: Specifies the value of the fixed delay interval. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `percentage`: The percentage of traffic (connections/operations/requests) on which delay will be introduced as part of fault injection. The value must be between 0.0 and 100.0 inclusive. + + * `request_mirror_policy`: Specifies the policy on how requests intended for the route's backends are shadowed to a separate mirrored backend service. Loadbalancer does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host / authority header is suffixed with -shadow. + + * `backend_service`: The BackendService resource being mirrored to. + + * `retry_policy`: Specifies the retry policy associated with this route. + + * `num_retries`: Specifies the allowed number retries. This number must be > 0. + + * `per_try_timeout`: Specifies a non-zero timeout per retry attempt. If not specified, will use the timeout set in HttpRouteAction. If timeout in HttpRouteAction is not set, will use the largest timeout among all backend services associated with the route. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `retry_conditions`: Specfies one or more conditions when this retry rule applies. Valid values are: - 5xx: Loadbalancer will attempt a retry if the backend service responds with any 5xx response code, or if the backend service does not respond at all, example: disconnects, reset, read timeout, connection failure, and refused streams. - gateway-error: Similar to 5xx, but only applies to response codes 502, 503 or 504. - connect-failure: Loadbalancer will retry on failures connecting to backend services, for example due to connection timeouts. - retriable-4xx: Loadbalancer will retry for retriable 4xx response codes. Currently the only retriable error supported is 409. - refused-stream: Loadbalancer will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Loadbalancer will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Loadbalancer will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Loadbalancer will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Loadbalancer will retry if the gRPC status code in the response header is set to unavailable + + * `timeout`: Specifies the timeout for the selected route. Timeout is computed from the time the request is has been fully processed (i.e. end-of-stream) up until the response has been completely processed. Timeout includes all retries. If not specified, the default value is 15 seconds. + + * `nanos`: Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 `seconds` field and a positive `nanos` field. Must be from 0 to 999,999,999 inclusive. + + * `seconds`: Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. + + * `url_rewrite`: The spec to modify the URL of the request, prior to forwarding the request to the matched service + + * `host_rewrite`: Prior to forwarding the request to the selected service, the request's host header is replaced with contents of hostRewrite. The value must be between 1 and 255 characters. + + * `path_prefix_rewrite`: Prior to forwarding the request to the selected backend service, the matching portion of the request's path is replaced by pathPrefixRewrite. The value must be between 1 and 1024 characters. + + * `weighted_backend_services`: A list of weighted backend services to send traffic to when a route match occurs. The weights determine the fraction of traffic that flows to their corresponding backend service. If all traffic needs to go to a single backend service, there must be one weightedBackendService with weight set to a non 0 number. Once a backendService is identified and before forwarding the request to the backend service, advanced routing actions like Url rewrites and header transformations are applied depending on additional settings specified in this HttpRouteAction. + + * `backend_service`: The default BackendService resource. Before forwarding the request to backendService, the loadbalancer applies any relevant headerActions specified as part of this backendServiceWeight. + + * `header_action`: Specifies changes to request and response headers that need to take effect for the selected backendService. headerAction specified here take effect before headerAction in the enclosing HttpRouteRule, PathMatcher and UrlMap. + + * `request_headers_to_add`: Headers to add to a matching request prior to forwarding the request to the backendService. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `request_headers_to_remove`: A list of header names for headers that need to be removed from the request prior to forwarding the request to the backendService. + + * `response_headers_to_add`: Headers to add the response prior to sending the response back to the client. + + * `header_name`: The name of the header. + + * `header_value`: The value of the header to add. + + * `replace`: If false, headerValue is appended to any values that already exist for the header. If true, headerValue is set for the header, discarding any values that were set for that header. + + * `response_headers_to_remove`: A list of header names for headers that need to be removed from the response prior to sending the response back to the client. + + * `weight`: Specifies the fraction of traffic sent to backendService, computed as weight / (sum of all weightedBackendService weights in routeAction) . The selection of a backend service is determined only for new traffic. Once a user's request has been directed to a backendService, subsequent requests will be sent to the same backendService as determined by the BackendService's session affinity policy. The value must be between 0 and 1000 + + * `url_redirect`: When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. + + * `host_redirect`: 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. + + * `https_redirect`: 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. Defaults to false. + + * `path_redirect`: The path that will be used in the redirect response instead of the one that was supplied in the request. Only one of pathRedirect or prefixRedirect must be specified. The value must be between 1 and 1024 characters. + + * `prefix_redirect`: The prefix that replaces the prefixMatch specified in the HttpRouteRuleMatch, retaining the remaining portion of the URL before redirecting the request. + + * `redirect_response_code`: 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. + + * `strip_query`: 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. Defaults to false. - * `tests`: The list of expected URL mappings. Requests to update this UrlMap will succeed only if all of the test cases pass. + * `tests`: The list of expected URL mapping tests. Request to update this UrlMap will succeed only if all of the test cases pass. You can specify a maximum of 100 tests per UrlMap. * `description`: Description of this test case. @@ -72,7 +412,7 @@ Properties that can be accessed from the `google_compute_url_map` resource: * `path`: Path portion of the URL. - * `service`: A reference to expected BackendService resource the given URL should be mapped to. + * `service`: Expected BackendService resource the given URL should be mapped to. ## GCP Permissions diff --git a/docs/resources/google_compute_url_maps.md b/docs/resources/google_compute_url_maps.md index 9f98d9c4f..a77dbdcdc 100644 --- a/docs/resources/google_compute_url_maps.md +++ b/docs/resources/google_compute_url_maps.md @@ -20,9 +20,10 @@ See [google_compute_url_map.md](google_compute_url_map.md) for more detailed inf * `creation_timestamps`: an array of `google_compute_url_map` creation_timestamp * `default_services`: an array of `google_compute_url_map` default_service * `descriptions`: an array of `google_compute_url_map` description - * `host_rules`: an array of `google_compute_url_map` host_rules * `ids`: an array of `google_compute_url_map` id * `fingerprints`: an array of `google_compute_url_map` fingerprint + * `header_actions`: an array of `google_compute_url_map` header_action + * `host_rules`: an array of `google_compute_url_map` host_rules * `names`: an array of `google_compute_url_map` name * `path_matchers`: an array of `google_compute_url_map` path_matchers * `tests`: an array of `google_compute_url_map` tests diff --git a/docs/resources/google_sourcerepo_repositories.md b/docs/resources/google_sourcerepo_repositories.md index 31fb72978..9abea868e 100644 --- a/docs/resources/google_sourcerepo_repositories.md +++ b/docs/resources/google_sourcerepo_repositories.md @@ -25,6 +25,7 @@ See [google_sourcerepo_repository.md](google_sourcerepo_repository.md) for more * `names`: an array of `google_sourcerepo_repository` name * `urls`: an array of `google_sourcerepo_repository` url * `sizes`: an array of `google_sourcerepo_repository` size + * `pubsub_configs`: an array of `google_sourcerepo_repository` pubsub_configs ## Filter Criteria This resource supports all of the above properties as filter criteria, which can be used diff --git a/docs/resources/google_sourcerepo_repository.md b/docs/resources/google_sourcerepo_repository.md index 5f6a21aa0..8b034e223 100644 --- a/docs/resources/google_sourcerepo_repository.md +++ b/docs/resources/google_sourcerepo_repository.md @@ -27,6 +27,8 @@ Properties that can be accessed from the `google_sourcerepo_repository` resource * `size`: The disk usage of the repo, in bytes. + * `pubsub_configs`: How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names. + ## GCP Permissions diff --git a/docs/resources/google_spanner_instance_iam_policy.md b/docs/resources/google_spanner_instance_iam_policy.md new file mode 100644 index 000000000..9d457e54a --- /dev/null +++ b/docs/resources/google_spanner_instance_iam_policy.md @@ -0,0 +1,46 @@ +--- +title: About the google_spanner_instance_iam_policy resource +platform: gcp +--- + +## Syntax +A `google_spanner_instance_iam_policy` is used to test a Google Instance Iam Policy resource + +## Examples +``` +describe google_spanner_instance_iam_policy(project: "project", name: "name") do + it { should exist } +end + +google_spanner_instance_iam_policy(project: "project", name: "name").bindings.each do |binding| + describe binding do + its('role') { should eq 'roles/editor'} + its('members') { should include 'user:testuser@example.com'} + end +end +``` + +## Properties +Properties that can be accessed from the `google_spanner_instance_iam_policy` resource: + + * `bindings`: Associates a list of members to a role. + + * `role`: Role that is assigned to members. For example, roles/viewer, roles/editor, or roles/owner. + + * `members`: Specifies the identities requesting access for a Cloud Platform resource. + + * `audit_configs`: Specifies cloud audit logging configuration for this policy. + + * `service`: Specifies a service that will be enabled for audit logging. For example, `storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special value that covers all services. + + * `audit_log_configs`: The configuration for logging of each type of permission. + + * `log_type`: The log type that this config enables. For example, ADMIN_READ, DATA_WRITE or DATA_READ + + * `exempted_members`: Specifies the identities that do not cause logging for this type of permission. + + + +## GCP Permissions + +Ensure the [Cloud Spanner API](https://console.cloud.google.com/apis/library/spanner.googleapis.com/) is enabled for the current project. diff --git a/libraries/google/compute/property/urlmap_header_action.rb b/libraries/google/compute/property/urlmap_header_action.rb new file mode 100644 index 000000000..39393dbca --- /dev/null +++ b/libraries/google/compute/property/urlmap_header_action.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapHeaderAction + attr_reader :request_headers_to_add + + attr_reader :request_headers_to_remove + + attr_reader :response_headers_to_add + + attr_reader :response_headers_to_remove + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) + @request_headers_to_remove = args['requestHeadersToRemove'] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @response_headers_to_remove = args['responseHeadersToRemove'] + end + + def to_s + "#{@parent_identifier} UrlMapHeaderAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb new file mode 100644 index 000000000..491868a0f --- /dev/null +++ b/libraries/google/compute/property/urlmap_header_action_request_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapHeaderActionRequestHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapHeaderActionRequestHeadersToAdd" + end + end + + class UrlMapHeaderActionRequestHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb new file mode 100644 index 000000000..73ceb8a02 --- /dev/null +++ b/libraries/google/compute/property/urlmap_header_action_response_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapHeaderActionResponseHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapHeaderActionResponseHeadersToAdd" + end + end + + class UrlMapHeaderActionResponseHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers.rb b/libraries/google/compute/property/urlmap_path_matchers.rb index da8563514..9fd1ee95d 100644 --- a/libraries/google/compute/property/urlmap_path_matchers.rb +++ b/libraries/google/compute/property/urlmap_path_matchers.rb @@ -13,7 +13,11 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_header_action' +require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' require 'google/compute/property/urlmap_path_matchers_path_rules' +require 'google/compute/property/urlmap_path_matchers_route_rules' module GoogleInSpec module Compute module Property @@ -22,17 +26,23 @@ class UrlMapPathMatchers attr_reader :description + attr_reader :header_action + attr_reader :name attr_reader :path_rules + attr_reader :route_rules + def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier @default_service = args['defaultService'] @description = args['description'] + @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderAction.new(args['headerAction'], to_s) @name = args['name'] @path_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesArray.parse(args['pathRules'], to_s) + @route_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesArray.parse(args['routeRules'], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action.rb new file mode 100644 index 000000000..88c9a6b50 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersHeaderAction + attr_reader :request_headers_to_add + + attr_reader :request_headers_to_remove + + attr_reader :response_headers_to_add + + attr_reader :response_headers_to_remove + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) + @request_headers_to_remove = args['requestHeadersToRemove'] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @response_headers_to_remove = args['responseHeadersToRemove'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersHeaderAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb new file mode 100644 index 000000000..d03feaf82 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action_request_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersHeaderActionRequestHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersHeaderActionRequestHeadersToAdd" + end + end + + class UrlMapPathMatchersHeaderActionRequestHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb new file mode 100644 index 000000000..4d0325474 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_header_action_response_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersHeaderActionResponseHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersHeaderActionResponseHeadersToAdd" + end + end + + class UrlMapPathMatchersHeaderActionResponseHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb index 6202f915e..0739ba173 100644 --- a/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules.rb @@ -13,19 +13,38 @@ # CONTRIBUTING.md located at the root of this package. # # ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services' +require 'google/compute/property/urlmap_path_matchers_path_rules_url_redirect' module GoogleInSpec module Compute module Property class UrlMapPathMatchersPathRules + attr_reader :service + attr_reader :paths - attr_reader :service + attr_reader :route_action + + attr_reader :url_redirect def initialize(args = nil, parent_identifier = nil) return if args.nil? @parent_identifier = parent_identifier - @paths = args['paths'] @service = args['service'] + @paths = args['paths'] + @route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteAction.new(args['routeAction'], to_s) + @url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesUrlRedirect.new(args['urlRedirect'], to_s) end def to_s diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action.rb new file mode 100644 index 000000000..524315eb6 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteAction + attr_reader :cors_policy + + attr_reader :fault_injection_policy + + attr_reader :request_mirror_policy + + attr_reader :retry_policy + + attr_reader :timeout + + attr_reader :url_rewrite + + attr_reader :weighted_backend_services + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s) + @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) + @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) + @retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s) + @timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionTimeout.new(args['timeout'], to_s) + @url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s) + @weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy.rb new file mode 100644 index 000000000..559ab6054 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_cors_policy.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionCorsPolicy + attr_reader :allow_credentials + + attr_reader :allow_headers + + attr_reader :allow_methods + + attr_reader :allow_origin_regexes + + attr_reader :allow_origins + + attr_reader :disabled + + attr_reader :expose_headers + + attr_reader :max_age + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @allow_credentials = args['allowCredentials'] + @allow_headers = args['allowHeaders'] + @allow_methods = args['allowMethods'] + @allow_origin_regexes = args['allowOriginRegexes'] + @allow_origins = args['allowOrigins'] + @disabled = args['disabled'] + @expose_headers = args['exposeHeaders'] + @max_age = args['maxAge'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionCorsPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy.rb new file mode 100644 index 000000000..d22ca1709 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy + attr_reader :abort + + attr_reader :delay + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @abort = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) + @delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort.rb new file mode 100644 index 000000000..fcc1b896a --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_abort.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort + attr_reader :http_status + + attr_reader :percentage + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @http_status = args['httpStatus'] + @percentage = args['percentage'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyAbort" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay.rb new file mode 100644 index 000000000..225070bca --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay + attr_reader :fixed_delay + + attr_reader :percentage + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @fixed_delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) + @percentage = args['percentage'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelay" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay.rb new file mode 100644 index 000000000..752c9e6a9 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_fault_injection_policy_delay_fixed_delay.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionFaultInjectionPolicyDelayFixedDelay" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy.rb new file mode 100644 index 000000000..6fc03ef36 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_request_mirror_policy.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy + attr_reader :backend_service + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @backend_service = args['backendService'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionRequestMirrorPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy.rb new file mode 100644 index 000000000..85a165d31 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionRetryPolicy + attr_reader :num_retries + + attr_reader :per_try_timeout + + attr_reader :retry_conditions + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @num_retries = args['numRetries'] + @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) + @retry_conditions = args['retryConditions'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionRetryPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout.rb new file mode 100644 index 000000000..dfafc2b1a --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_retry_policy_per_try_timeout.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionRetryPolicyPerTryTimeout" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout.rb new file mode 100644 index 000000000..e9ea3911c --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_timeout.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionTimeout + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionTimeout" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite.rb new file mode 100644 index 000000000..7fa219df9 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_url_rewrite.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionUrlRewrite + attr_reader :host_rewrite + + attr_reader :path_prefix_rewrite + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @host_rewrite = args['hostRewrite'] + @path_prefix_rewrite = args['pathPrefixRewrite'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionUrlRewrite" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services.rb new file mode 100644 index 000000000..1f506bc3b --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServices + attr_reader :backend_service + + attr_reader :header_action + + attr_reader :weight + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @backend_service = args['backendService'] + @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) + @weight = args['weight'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionWeightedBackendServices" + end + end + + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersPathRulesRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersPathRulesRouteActionWeightedBackendServices.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action.rb new file mode 100644 index 000000000..88bb4d901 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction + attr_reader :request_headers_to_add + + attr_reader :request_headers_to_remove + + attr_reader :response_headers_to_add + + attr_reader :response_headers_to_remove + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) + @request_headers_to_remove = args['requestHeadersToRemove'] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @response_headers_to_remove = args['responseHeadersToRemove'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb new file mode 100644 index 000000000..f550e2a83 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" + end + end + + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb new file mode 100644 index 000000000..fc401d197 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd" + end + end + + class UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersPathRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_path_rules_url_redirect.rb b/libraries/google/compute/property/urlmap_path_matchers_path_rules_url_redirect.rb new file mode 100644 index 000000000..9f8f071c4 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_path_rules_url_redirect.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersPathRulesUrlRedirect + attr_reader :host_redirect + + attr_reader :https_redirect + + attr_reader :path_redirect + + attr_reader :prefix_redirect + + attr_reader :redirect_response_code + + attr_reader :strip_query + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @host_redirect = args['hostRedirect'] + @https_redirect = args['httpsRedirect'] + @path_redirect = args['pathRedirect'] + @prefix_redirect = args['prefixRedirect'] + @redirect_response_code = args['redirectResponseCode'] + @strip_query = args['stripQuery'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersPathRulesUrlRedirect" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules.rb new file mode 100644 index 000000000..7ff7a81ab --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_header_action' +require 'google/compute/property/urlmap_path_matchers_route_rules_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_route_rules_header_action_response_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_cors_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_request_mirror_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_timeout' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_url_rewrite' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services' +require 'google/compute/property/urlmap_path_matchers_route_rules_url_redirect' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRules + attr_reader :priority + + attr_reader :service + + attr_reader :header_action + + attr_reader :match_rules + + attr_reader :route_action + + attr_reader :url_redirect + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @priority = args['priority'] + @service = args['service'] + @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesHeaderAction.new(args['headerAction'], to_s) + @match_rules = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesArray.parse(args['matchRules'], to_s) + @route_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteAction.new(args['routeAction'], to_s) + @url_redirect = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesUrlRedirect.new(args['urlRedirect'], to_s) + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRules" + end + end + + class UrlMapPathMatchersRouteRulesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRules.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRules.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action.rb new file mode 100644 index 000000000..5995e327a --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_route_rules_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesHeaderAction + attr_reader :request_headers_to_add + + attr_reader :request_headers_to_remove + + attr_reader :response_headers_to_add + + attr_reader :response_headers_to_remove + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) + @request_headers_to_remove = args['requestHeadersToRemove'] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @response_headers_to_remove = args['responseHeadersToRemove'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesHeaderAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_request_headers_to_add.rb new file mode 100644 index 000000000..168c0d84f --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_request_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd" + end + end + + class UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_response_headers_to_add.rb new file mode 100644 index 000000000..21cc30fe8 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_header_action_response_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd" + end + end + + class UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules.rb new file mode 100644 index 000000000..04998391a --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches' +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters' +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules_query_parameter_matches' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRules + attr_reader :full_path_match + + attr_reader :header_matches + + attr_reader :ignore_case + + attr_reader :metadata_filters + + attr_reader :prefix_match + + attr_reader :query_parameter_matches + + attr_reader :regex_match + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @full_path_match = args['fullPathMatch'] + @header_matches = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesArray.parse(args['headerMatches'], to_s) + @ignore_case = args['ignoreCase'] + @metadata_filters = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersArray.parse(args['metadataFilters'], to_s) + @prefix_match = args['prefixMatch'] + @query_parameter_matches = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatchesArray.parse(args['queryParameterMatches'], to_s) + @regex_match = args['regexMatch'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRules" + end + end + + class UrlMapPathMatchersRouteRulesMatchRulesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesMatchRules.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesMatchRules.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches.rb new file mode 100644 index 000000000..f5bb4ea9b --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches_range_match' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRulesHeaderMatches + attr_reader :exact_match + + attr_reader :header_name + + attr_reader :invert_match + + attr_reader :prefix_match + + attr_reader :present_match + + attr_reader :range_match + + attr_reader :regex_match + + attr_reader :suffix_match + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @exact_match = args['exactMatch'] + @header_name = args['headerName'] + @invert_match = args['invertMatch'] + @prefix_match = args['prefixMatch'] + @present_match = args['presentMatch'] + @range_match = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch.new(args['rangeMatch'], to_s) + @regex_match = args['regexMatch'] + @suffix_match = args['suffixMatch'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRulesHeaderMatches" + end + end + + class UrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesMatchRulesHeaderMatches.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesMatchRulesHeaderMatches.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches_range_match.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches_range_match.rb new file mode 100644 index 000000000..11ec19a0c --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_header_matches_range_match.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch + attr_reader :range_end + + attr_reader :range_start + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @range_end = args['rangeEnd'] + @range_start = args['rangeStart'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRulesHeaderMatchesRangeMatch" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters.rb new file mode 100644 index 000000000..297f454c9 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters.rb @@ -0,0 +1,46 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRulesMetadataFilters + attr_reader :filter_labels + + attr_reader :filter_match_criteria + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @filter_labels = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabelsArray.parse(args['filterLabels'], to_s) + @filter_match_criteria = args['filterMatchCriteria'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRulesMetadataFilters" + end + end + + class UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesMatchRulesMetadataFilters.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesMatchRulesMetadataFilters.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels.rb new file mode 100644 index 000000000..eb5bd83b4 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_metadata_filters_filter_labels.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels + attr_reader :name + + attr_reader :value + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @name = args['name'] + @value = args['value'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels" + end + end + + class UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabelsArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesMatchRulesMetadataFiltersFilterLabels.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_query_parameter_matches.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_query_parameter_matches.rb new file mode 100644 index 000000000..7dc67cf63 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_match_rules_query_parameter_matches.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches + attr_reader :exact_match + + attr_reader :name + + attr_reader :present_match + + attr_reader :regex_match + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @exact_match = args['exactMatch'] + @name = args['name'] + @present_match = args['presentMatch'] + @regex_match = args['regexMatch'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches" + end + end + + class UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatchesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesMatchRulesQueryParameterMatches.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action.rb new file mode 100644 index 000000000..0e005e133 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_cors_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_request_mirror_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_timeout' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_url_rewrite' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteAction + attr_reader :cors_policy + + attr_reader :fault_injection_policy + + attr_reader :request_mirror_policy + + attr_reader :retry_policy + + attr_reader :timeout + + attr_reader :url_rewrite + + attr_reader :weighted_backend_services + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @cors_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionCorsPolicy.new(args['corsPolicy'], to_s) + @fault_injection_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy.new(args['faultInjectionPolicy'], to_s) + @request_mirror_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy.new(args['requestMirrorPolicy'], to_s) + @retry_policy = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionRetryPolicy.new(args['retryPolicy'], to_s) + @timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionTimeout.new(args['timeout'], to_s) + @url_rewrite = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionUrlRewrite.new(args['urlRewrite'], to_s) + @weighted_backend_services = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesArray.parse(args['weightedBackendServices'], to_s) + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_cors_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_cors_policy.rb new file mode 100644 index 000000000..a6aead59d --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_cors_policy.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionCorsPolicy + attr_reader :allow_credentials + + attr_reader :allow_headers + + attr_reader :allow_methods + + attr_reader :allow_origin_regexes + + attr_reader :allow_origins + + attr_reader :disabled + + attr_reader :expose_headers + + attr_reader :max_age + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @allow_credentials = args['allowCredentials'] + @allow_headers = args['allowHeaders'] + @allow_methods = args['allowMethods'] + @allow_origin_regexes = args['allowOriginRegexes'] + @allow_origins = args['allowOrigins'] + @disabled = args['disabled'] + @expose_headers = args['exposeHeaders'] + @max_age = args['maxAge'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionCorsPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy.rb new file mode 100644 index 000000000..e079a362b --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy + attr_reader :abort + + attr_reader :delay + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @abort = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort.new(args['abort'], to_s) + @delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay.new(args['delay'], to_s) + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort.rb new file mode 100644 index 000000000..ca5b45153 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_abort.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort + attr_reader :http_status + + attr_reader :percentage + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @http_status = args['httpStatus'] + @percentage = args['percentage'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyAbort" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay.rb new file mode 100644 index 000000000..51539e1d0 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay + attr_reader :fixed_delay + + attr_reader :percentage + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @fixed_delay = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay.new(args['fixedDelay'], to_s) + @percentage = args['percentage'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelay" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay.rb new file mode 100644 index 000000000..c0e429012 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_fault_injection_policy_delay_fixed_delay.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionFaultInjectionPolicyDelayFixedDelay" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_request_mirror_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_request_mirror_policy.rb new file mode 100644 index 000000000..01f1eead7 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_request_mirror_policy.rb @@ -0,0 +1,34 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy + attr_reader :backend_service + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @backend_service = args['backendService'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionRequestMirrorPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy.rb new file mode 100644 index 000000000..b2b5d5b4c --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionRetryPolicy + attr_reader :num_retries + + attr_reader :per_try_timeout + + attr_reader :retry_conditions + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @num_retries = args['numRetries'] + @per_try_timeout = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout.new(args['perTryTimeout'], to_s) + @retry_conditions = args['retryConditions'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionRetryPolicy" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout.rb new file mode 100644 index 000000000..e90e89d59 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_retry_policy_per_try_timeout.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionRetryPolicyPerTryTimeout" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_timeout.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_timeout.rb new file mode 100644 index 000000000..04960153a --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_timeout.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionTimeout + attr_reader :nanos + + attr_reader :seconds + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @nanos = args['nanos'] + @seconds = args['seconds'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionTimeout" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_url_rewrite.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_url_rewrite.rb new file mode 100644 index 000000000..01a8af266 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_url_rewrite.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionUrlRewrite + attr_reader :host_rewrite + + attr_reader :path_prefix_rewrite + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @host_rewrite = args['hostRewrite'] + @path_prefix_rewrite = args['pathPrefixRewrite'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionUrlRewrite" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services.rb new file mode 100644 index 000000000..6cd5dcd63 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices + attr_reader :backend_service + + attr_reader :header_action + + attr_reader :weight + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @backend_service = args['backendService'] + @header_action = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction.new(args['headerAction'], to_s) + @weight = args['weight'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices" + end + end + + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServices.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action.rb new file mode 100644 index 000000000..cb063eb62 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add' +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction + attr_reader :request_headers_to_add + + attr_reader :request_headers_to_remove + + attr_reader :response_headers_to_add + + attr_reader :response_headers_to_remove + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @request_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray.parse(args['requestHeadersToAdd'], to_s) + @request_headers_to_remove = args['requestHeadersToRemove'] + @response_headers_to_add = GoogleInSpec::Compute::Property::UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray.parse(args['responseHeadersToAdd'], to_s) + @response_headers_to_remove = args['responseHeadersToRemove'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderAction" + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb new file mode 100644 index 000000000..199e26c74 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_request_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd" + end + end + + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionRequestHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb new file mode 100644 index 000000000..9d988c712 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_route_action_weighted_backend_services_header_action_response_headers_to_add.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd + attr_reader :header_name + + attr_reader :header_value + + attr_reader :replace + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @header_name = args['headerName'] + @header_value = args['headerValue'] + @replace = args['replace'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd" + end + end + + class UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAddArray + def self.parse(value, parent_identifier) + return if value.nil? + return UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(value, parent_identifier) unless value.is_a?(::Array) + value.map { |v| UrlMapPathMatchersRouteRulesRouteActionWeightedBackendServicesHeaderActionResponseHeadersToAdd.new(v, parent_identifier) } + end + end + end + end +end diff --git a/libraries/google/compute/property/urlmap_path_matchers_route_rules_url_redirect.rb b/libraries/google/compute/property/urlmap_path_matchers_route_rules_url_redirect.rb new file mode 100644 index 000000000..e5c33d853 --- /dev/null +++ b/libraries/google/compute/property/urlmap_path_matchers_route_rules_url_redirect.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module Compute + module Property + class UrlMapPathMatchersRouteRulesUrlRedirect + attr_reader :host_redirect + + attr_reader :https_redirect + + attr_reader :path_redirect + + attr_reader :prefix_redirect + + attr_reader :redirect_response_code + + attr_reader :strip_query + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @host_redirect = args['hostRedirect'] + @https_redirect = args['httpsRedirect'] + @path_redirect = args['pathRedirect'] + @prefix_redirect = args['prefixRedirect'] + @redirect_response_code = args['redirectResponseCode'] + @strip_query = args['stripQuery'] + end + + def to_s + "#{@parent_identifier} UrlMapPathMatchersRouteRulesUrlRedirect" + end + end + end + end +end diff --git a/libraries/google/sourcerepo/property/repository_pubsub_configs.rb b/libraries/google/sourcerepo/property/repository_pubsub_configs.rb new file mode 100644 index 000000000..e4f94c9b2 --- /dev/null +++ b/libraries/google/sourcerepo/property/repository_pubsub_configs.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +module GoogleInSpec + module SourceRepo + module Property + class RepositoryPubsubConfigs + attr_reader :message_format + + attr_reader :service_account_email + + def initialize(args = nil, parent_identifier = nil) + return if args.nil? + @parent_identifier = parent_identifier + @message_format = args['messageFormat'] + @service_account_email = args['serviceAccountEmail'] + end + + def to_s + "#{@parent_identifier} RepositoryPubsubConfigs" + end + end + end + end +end diff --git a/libraries/google_compute_url_map.rb b/libraries/google_compute_url_map.rb index 2801f8be1..b2a834450 100644 --- a/libraries/google_compute_url_map.rb +++ b/libraries/google_compute_url_map.rb @@ -14,6 +14,9 @@ # # ---------------------------------------------------------------------------- require 'gcp_backend' +require 'google/compute/property/urlmap_header_action' +require 'google/compute/property/urlmap_header_action_request_headers_to_add' +require 'google/compute/property/urlmap_header_action_response_headers_to_add' require 'google/compute/property/urlmap_host_rules' require 'google/compute/property/urlmap_path_matchers' require 'google/compute/property/urlmap_tests' @@ -28,9 +31,10 @@ class ComputeUrlMap < GcpResourceBase attr_reader :creation_timestamp attr_reader :default_service attr_reader :description - attr_reader :host_rules attr_reader :id attr_reader :fingerprint + attr_reader :header_action + attr_reader :host_rules attr_reader :name attr_reader :path_matchers attr_reader :tests @@ -46,9 +50,10 @@ def parse @creation_timestamp = parse_time_string(@fetched['creationTimestamp']) @default_service = @fetched['defaultService'] @description = @fetched['description'] - @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) @id = @fetched['id'] @fingerprint = @fetched['fingerprint'] + @header_action = GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(@fetched['headerAction'], to_s) + @host_rules = GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(@fetched['hostRules'], to_s) @name = @fetched['name'] @path_matchers = GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(@fetched['pathMatchers'], to_s) @tests = GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(@fetched['tests'], to_s) diff --git a/libraries/google_compute_url_maps.rb b/libraries/google_compute_url_maps.rb index 3b0295761..46cba9eea 100644 --- a/libraries/google_compute_url_maps.rb +++ b/libraries/google_compute_url_maps.rb @@ -26,9 +26,10 @@ class ComputeUrlMaps < GcpResourceBase filter_table_config.add(:creation_timestamps, field: :creation_timestamp) filter_table_config.add(:default_services, field: :default_service) filter_table_config.add(:descriptions, field: :description) - filter_table_config.add(:host_rules, field: :host_rules) filter_table_config.add(:ids, field: :id) filter_table_config.add(:fingerprints, field: :fingerprint) + filter_table_config.add(:header_actions, field: :header_action) + filter_table_config.add(:host_rules, field: :host_rules) filter_table_config.add(:names, field: :name) filter_table_config.add(:path_matchers, field: :path_matchers) filter_table_config.add(:tests, field: :tests) @@ -74,9 +75,10 @@ def transformers 'creationTimestamp' => ->(obj) { return :creation_timestamp, parse_time_string(obj['creationTimestamp']) }, 'defaultService' => ->(obj) { return :default_service, obj['defaultService'] }, 'description' => ->(obj) { return :description, obj['description'] }, - 'hostRules' => ->(obj) { return :host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s) }, 'id' => ->(obj) { return :id, obj['id'] }, 'fingerprint' => ->(obj) { return :fingerprint, obj['fingerprint'] }, + 'headerAction' => ->(obj) { return :header_action, GoogleInSpec::Compute::Property::UrlMapHeaderAction.new(obj['headerAction'], to_s) }, + 'hostRules' => ->(obj) { return :host_rules, GoogleInSpec::Compute::Property::UrlMapHostRulesArray.parse(obj['hostRules'], to_s) }, 'name' => ->(obj) { return :name, obj['name'] }, 'pathMatchers' => ->(obj) { return :path_matchers, GoogleInSpec::Compute::Property::UrlMapPathMatchersArray.parse(obj['pathMatchers'], to_s) }, 'tests' => ->(obj) { return :tests, GoogleInSpec::Compute::Property::UrlMapTestsArray.parse(obj['tests'], to_s) }, diff --git a/libraries/google_sourcerepo_repositories.rb b/libraries/google_sourcerepo_repositories.rb index 704c6c46a..e589c80e2 100644 --- a/libraries/google_sourcerepo_repositories.rb +++ b/libraries/google_sourcerepo_repositories.rb @@ -26,6 +26,7 @@ class SourceRepoRepositorys < GcpResourceBase filter_table_config.add(:names, field: :name) filter_table_config.add(:urls, field: :url) filter_table_config.add(:sizes, field: :size) + filter_table_config.add(:pubsub_configs, field: :pubsub_configs) filter_table_config.connect(self, :table) @@ -68,6 +69,7 @@ def transformers 'name' => ->(obj) { return :name, obj['name'] }, 'url' => ->(obj) { return :url, obj['url'] }, 'size' => ->(obj) { return :size, obj['size'] }, + 'pubsubConfigs' => ->(obj) { return :pubsub_configs, obj['pubsubConfigs'] }, } end diff --git a/libraries/google_sourcerepo_repository.rb b/libraries/google_sourcerepo_repository.rb index 422477eb6..665d706df 100644 --- a/libraries/google_sourcerepo_repository.rb +++ b/libraries/google_sourcerepo_repository.rb @@ -14,6 +14,7 @@ # # ---------------------------------------------------------------------------- require 'gcp_backend' +require 'google/sourcerepo/property/repository_pubsub_configs' # A provider to manage Cloud Source Repositories resources. class SourceRepoRepository < GcpResourceBase @@ -25,6 +26,7 @@ class SourceRepoRepository < GcpResourceBase attr_reader :name attr_reader :url attr_reader :size + attr_reader :pubsub_configs def initialize(params) super(params.merge({ use_http_transport: true })) @@ -37,6 +39,7 @@ def parse @name = @fetched['name'] @url = @fetched['url'] @size = @fetched['size'] + @pubsub_configs = @fetched['pubsubConfigs'] end # Handles parsing RFC3339 time string diff --git a/libraries/google_spanner_instance_iam_policy.rb b/libraries/google_spanner_instance_iam_policy.rb new file mode 100644 index 000000000..ae5980622 --- /dev/null +++ b/libraries/google_spanner_instance_iam_policy.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: false + +# ---------------------------------------------------------------------------- +# +# *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** +# +# ---------------------------------------------------------------------------- +# +# This file is automatically generated by Magic Modules and manual +# changes will be clobbered when the file is regenerated. +# +# Please read more about how to change this file in README.md and +# CONTRIBUTING.md located at the root of this package. +# +# ---------------------------------------------------------------------------- +require 'gcp_backend' +require 'google/iam/property/iam_policy_audit_configs' +require 'google/iam/property/iam_policy_bindings' + +# A provider to manage Cloud Spanner IAM Policy resources. +class InstanceIamPolicy < GcpResourceBase + name 'google_spanner_instance_iam_policy' + desc 'Instance Iam Policy' + supports platform: 'gcp' + + attr_reader :params + attr_reader :bindings + attr_reader :audit_configs + + def initialize(params) + super(params.merge({ use_http_transport: true })) + @params = params + @fetched = @connection.fetch(product_url, resource_base_url, params, 'Post') + parse unless @fetched.nil? + end + + def parse + @bindings = GoogleInSpec::Iam::Property::IamPolicyBindingsArray.parse(@fetched['bindings'], to_s) + @audit_configs = GoogleInSpec::Iam::Property::IamPolicyAuditConfigsArray.parse(@fetched['auditConfigs'], to_s) + end + + def exists? + !@fetched.nil? + end + + def to_s + "Instance IamPolicy #{@params[:name]}" + end + + private + + def product_url + 'https://spanner.googleapis.com/v1/' + end + + def resource_base_url + 'projects/{{project}}/instances/{{name}}:getIamPolicy' + end +end diff --git a/test/integration/build/gcp-mm.tf b/test/integration/build/gcp-mm.tf index c150ab588..01a078f32 100644 --- a/test/integration/build/gcp-mm.tf +++ b/test/integration/build/gcp-mm.tf @@ -880,6 +880,12 @@ resource "google_project_service" "project" { service = var.service["name"] } +resource "google_service_account" "spanner_service_account" { + project = "${var.gcp_project_id}" + account_id = "${var.gcp_service_account_display_name}-sp" + display_name = "${var.gcp_service_account_display_name}-sp" +} + resource "google_spanner_instance" "spanner_instance" { project = "${var.gcp_project_id}" config = "${var.spannerinstance["config"]}" @@ -891,6 +897,15 @@ resource "google_spanner_instance" "spanner_instance" { } } +resource "google_spanner_instance_iam_binding" "instance" { + instance = google_spanner_instance.spanner_instance.name + role = "roles/editor" + + members = [ + "serviceAccount:${google_service_account.spanner_service_account.email}", + ] +} + resource "google_spanner_database" "database" { project = "${var.gcp_project_id}" instance = "${google_spanner_instance.spanner_instance.name}" diff --git a/test/integration/verify/controls/google_spanner_instance_iam_policy.rb b/test/integration/verify/controls/google_spanner_instance_iam_policy.rb new file mode 100644 index 000000000..1aeb14b6a --- /dev/null +++ b/test/integration/verify/controls/google_spanner_instance_iam_policy.rb @@ -0,0 +1,27 @@ +title 'Test GCP google_spanner_instance_iam_policy resource.' + +gcp_project_id = attribute(:gcp_project_id, default: 'gcp_project_id', description: 'The GCP project identifier.') +spannerinstance = attribute('spannerinstance', default: { + "config": "regional-us-east1", + "name": "spinstance", + "display_name": "inspectest", + "num_nodes": 1, + "label_key": "env", + "label_value": "test" +}, description: 'Cloud Spanner definition') + +gcp_service_account_display_name = attribute(:gcp_service_account_display_name, default:'', description: 'Service account display name.') +gcp_enable_privileged_resources = attribute(:gcp_enable_privileged_resources,default:0,description:'Flag to enable privileged resources requiring elevated privileges in GCP.') + +control 'google_spanner_instance_iam_policy-1.0' do + + only_if { gcp_enable_privileged_resources.to_i == 1 } + impact 1.0 + title 'google_spanner_instance_iam_policy resource test' + + describe google_spanner_instance_iam_policy(project: gcp_project_id, name: spannerinstance['name']) do + it { should exist } + its('role') { should eq "roles/editor" } + its('members') { should include "serviceAccount:#{gcp_service_account_display_name}-sp@#{gcp_project_id}.iam.gserviceaccount.com" } + end +end