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/v1beta1.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)
public static Output<GetAuthorizationPolicyResult> getAuthorizationPolicy(GetAuthorizationPolicyArgs args, InvokeOptions options)
fn::invoke:
function: google-native:networksecurity/v1beta1: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. V1Beta1. 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
This property is required. 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 Match This property is required. Pulumi.Google Native. Network Security. V1Beta1. 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
This property is required. List<string> - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- Ports
This property is required. List<int> - List of destination ports to match. At least one port should match.
- Hosts
This property is required. []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 Match This property is required. HttpHeader 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
This property is required. []string - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- Ports
This property is required. []int - List of destination ports to match. At least one port should match.
- hosts
This property is required. 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 Match This property is required. HttpHeader 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
This property is required. List<String> - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports
This property is required. List<Integer> - List of destination ports to match. At least one port should match.
- hosts
This property is required. 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 Match This property is required. HttpHeader 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
This property is required. string[] - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports
This property is required. number[] - List of destination ports to match. At least one port should match.
- hosts
This property is required. 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_ match This property is required. HttpHeader 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
This property is required. Sequence[str] - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports
This property is required. Sequence[int] - List of destination ports to match. At least one port should match.
- hosts
This property is required. 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 Match This property is required. Property Map - 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
This property is required. List<String> - Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.
- ports
This property is required. List<Number> - List of destination ports to match. At least one port should match.
HttpHeaderMatchResponse
- Header
Name This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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 This property is required. 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
This property is required. List<Pulumi.Google Native. Network Security. V1Beta1. 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
This property is required. List<Pulumi.Google Native. Network Security. V1Beta1. 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
This property is required. []DestinationResponse - 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
This property is required. []SourceResponse - 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
This property is required. List<DestinationResponse> - 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
This property is required. List<SourceResponse> - 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
This property is required. DestinationResponse[] - 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
This property is required. SourceResponse[] - 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
This property is required. Sequence[DestinationResponse] - 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
This property is required. Sequence[SourceResponse] - 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
This property is required. 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
This property is required. 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 This property is required. 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
This property is required. 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 This property is required. []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
This property is required. []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 This property is required. 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
This property is required. 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 This property is required. 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
This property is required. 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 This property is required. 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
This property is required. 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 This property is required. 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
This property is required. 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