Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi
google-native.networksecurity/v1.getAuthorizationPolicy
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi
Gets details of a single AuthorizationPolicy.
Using getAuthorizationPolicy
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAuthorizationPolicy(args: GetAuthorizationPolicyArgs, opts?: InvokeOptions): Promise<GetAuthorizationPolicyResult>
function getAuthorizationPolicyOutput(args: GetAuthorizationPolicyOutputArgs, opts?: InvokeOptions): Output<GetAuthorizationPolicyResult>
def get_authorization_policy(authorization_policy_id: Optional[str] = None,
location: Optional[str] = None,
project: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAuthorizationPolicyResult
def get_authorization_policy_output(authorization_policy_id: Optional[pulumi.Input[str]] = None,
location: Optional[pulumi.Input[str]] = None,
project: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAuthorizationPolicyResult]
func LookupAuthorizationPolicy(ctx *Context, args *LookupAuthorizationPolicyArgs, opts ...InvokeOption) (*LookupAuthorizationPolicyResult, error)
func LookupAuthorizationPolicyOutput(ctx *Context, args *LookupAuthorizationPolicyOutputArgs, opts ...InvokeOption) LookupAuthorizationPolicyResultOutput
> Note: This function is named LookupAuthorizationPolicy
in the Go SDK.
public static class GetAuthorizationPolicy
{
public static Task<GetAuthorizationPolicyResult> InvokeAsync(GetAuthorizationPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetAuthorizationPolicyResult> Invoke(GetAuthorizationPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAuthorizationPolicyResult> getAuthorizationPolicy(GetAuthorizationPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: google-native:networksecurity/v1:getAuthorizationPolicy
arguments:
# arguments dictionary
The following arguments are supported:
getAuthorizationPolicy Result
The following output properties are available:
- Action string
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- Create
Time string - The timestamp when the resource was created.
- Description string
- Optional. Free-text description of the resource.
- Labels Dictionary<string, string>
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- Name string
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - Rules
List<Pulumi.
Google Native. Network Security. V1. Outputs. Rule Response> - Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - Update
Time string - The timestamp when the resource was updated.
- Action string
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- Create
Time string - The timestamp when the resource was created.
- Description string
- Optional. Free-text description of the resource.
- Labels map[string]string
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- Name string
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - Rules
[]Rule
Response - Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - Update
Time string - The timestamp when the resource was updated.
- action String
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- create
Time String - The timestamp when the resource was created.
- description String
- Optional. Free-text description of the resource.
- labels Map<String,String>
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- name String
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - rules
List<Rule
Response> - Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - update
Time String - The timestamp when the resource was updated.
- action string
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- create
Time string - The timestamp when the resource was created.
- description string
- Optional. Free-text description of the resource.
- labels {[key: string]: string}
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- name string
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - rules
Rule
Response[] - Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - update
Time string - The timestamp when the resource was updated.
- action str
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- create_
time str - The timestamp when the resource was created.
- description str
- Optional. Free-text description of the resource.
- labels Mapping[str, str]
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- name str
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - rules
Sequence[Rule
Response] - Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - update_
time str - The timestamp when the resource was updated.
- action String
- The action to take when a rule match is found. Possible values are "ALLOW" or "DENY".
- create
Time String - The timestamp when the resource was created.
- description String
- Optional. Free-text description of the resource.
- labels Map<String>
- Optional. Set of label tags associated with the AuthorizationPolicy resource.
- name String
- Name of the AuthorizationPolicy resource. It matches pattern
projects/{project}/locations/{location}/authorizationPolicies/
. - rules List<Property Map>
- Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the
action
field will be applied on every request. - update
Time String - The timestamp when the resource was updated.
Supporting Types
DestinationResponse
- Hosts List<string>
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- Http
Header Pulumi.Match Google Native. Network Security. V1. Inputs. Http Header Match Response - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- Methods List<string>
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- Ports List<int>
- List of destination ports to match. At least one port should match.
- Hosts []string
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- Http
Header HttpMatch Header Match Response - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- Methods []string
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- Ports []int
- List of destination ports to match. At least one port should match.
- hosts List<String>
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- http
Header HttpMatch Header Match Response - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- methods List<String>
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports List<Integer>
- List of destination ports to match. At least one port should match.
- hosts string[]
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- http
Header HttpMatch Header Match Response - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- methods string[]
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports number[]
- List of destination ports to match. At least one port should match.
- hosts Sequence[str]
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- http_
header_ Httpmatch Header Match Response - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- methods Sequence[str]
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports Sequence[int]
- List of destination ports to match. At least one port should match.
- hosts List<String>
- List of host names to match. Matched against the ":authority" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example "mydomain.") or a suffix match (example ".myorg.com") or a presence (any) match "*".
- http
Header Property MapMatch - Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy.
- methods List<String>
- Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports List<Number>
- List of destination ports to match. At least one port should match.
HttpHeaderMatchResponse
- Header
Name string - 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".
- Regex
Match string - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
- Header
Name string - 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".
- Regex
Match string - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
- header
Name String - 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".
- regex
Match String - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
- header
Name string - 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".
- regex
Match string - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
- header_
name str - 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".
- regex_
match str - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
- header
Name String - 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".
- regex
Match String - The value of the header must match the regular 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 Host and a regular expression that satisfies the RFC2616 Host header's port specifier.
RuleResponse
- Destinations
List<Pulumi.
Google Native. Network Security. V1. Inputs. Destination Response> - Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- Sources
List<Pulumi.
Google Native. Network Security. V1. Inputs. Source Response> - Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
- Destinations
[]Destination
Response - Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- Sources
[]Source
Response - Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
- destinations
List<Destination
Response> - Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- sources
List<Source
Response> - Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
- destinations
Destination
Response[] - Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- sources
Source
Response[] - Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
- destinations
Sequence[Destination
Response] - Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- sources
Sequence[Source
Response] - Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
- destinations List<Property Map>
- Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.
- sources List<Property Map>
- Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.
SourceResponse
- Ip
Blocks List<string> - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- Principals List<string>
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
- Ip
Blocks []string - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- Principals []string
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
- ip
Blocks List<String> - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- principals List<String>
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
- ip
Blocks string[] - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- principals string[]
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
- ip_
blocks Sequence[str] - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- principals Sequence[str]
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
- ip
Blocks List<String> - Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., "1.2.3.4") and CIDR (e.g., "1.2.3.0/24") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.
- principals List<String>
- Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, "namespace/") or a suffix match (example, "/service-account") or a presence match "*". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Google Cloud Native v0.32.0 published on Wednesday, Nov 29, 2023 by Pulumi