1. Packages
  2. Google Cloud Native
  3. API Docs
  4. networksecurity
  5. networksecurity/v1beta1
  6. getAuthorizationPolicy

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>
Copy
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]
Copy
func LookupAuthorizationPolicy(ctx *Context, args *LookupAuthorizationPolicyArgs, opts ...InvokeOption) (*LookupAuthorizationPolicyResult, error)
func LookupAuthorizationPolicyOutput(ctx *Context, args *LookupAuthorizationPolicyOutputArgs, opts ...InvokeOption) LookupAuthorizationPolicyResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetAuthorizationPolicyResult> getAuthorizationPolicy(GetAuthorizationPolicyArgs args, InvokeOptions options)
public static Output<GetAuthorizationPolicyResult> getAuthorizationPolicy(GetAuthorizationPolicyArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: google-native:networksecurity/v1beta1:getAuthorizationPolicy
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AuthorizationPolicyId This property is required. string
Location This property is required. string
Project string
AuthorizationPolicyId This property is required. string
Location This property is required. string
Project string
authorizationPolicyId This property is required. String
location This property is required. String
project String
authorizationPolicyId This property is required. string
location This property is required. string
project string
authorization_policy_id This property is required. str
location This property is required. str
project str
authorizationPolicyId This property is required. String
location This property is required. String
project String

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".
CreateTime 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.GoogleNative.NetworkSecurity.V1Beta1.Outputs.RuleResponse>
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.
UpdateTime 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".
CreateTime 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 []RuleResponse
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.
UpdateTime 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".
createTime 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<RuleResponse>
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.
updateTime 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".
createTime 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 RuleResponse[]
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.
updateTime 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[RuleResponse]
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".
createTime 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.
updateTime 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 "*".
HttpHeaderMatch This property is required. Pulumi.GoogleNative.NetworkSecurity.V1Beta1.Inputs.HttpHeaderMatchResponse
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 "*".
HttpHeaderMatch This property is required. HttpHeaderMatchResponse
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 "*".
httpHeaderMatch This property is required. HttpHeaderMatchResponse
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 "*".
httpHeaderMatch This property is required. HttpHeaderMatchResponse
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. HttpHeaderMatchResponse
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 "*".
httpHeaderMatch 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

HeaderName 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".
RegexMatch 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.
HeaderName 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".
RegexMatch 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.
headerName 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".
regexMatch 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.
headerName 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".
regexMatch 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.
headerName 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".
regexMatch 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.GoogleNative.NetworkSecurity.V1Beta1.Inputs.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<Pulumi.GoogleNative.NetworkSecurity.V1Beta1.Inputs.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. 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

IpBlocks 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.
IpBlocks 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.
ipBlocks 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.
ipBlocks 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.
ipBlocks 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