Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi
oci.ServiceMesh.getAccessPolicy
Explore with Pulumi AI
This data source provides details about a specific Access Policy resource in Oracle Cloud Infrastructure Service Mesh service.
Get an AccessPolicy by identifier.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testAccessPolicy = oci.ServiceMesh.getAccessPolicy({
accessPolicyId: testAccessPolicyOciServiceMeshAccessPolicy.id,
});
import pulumi
import pulumi_oci as oci
test_access_policy = oci.ServiceMesh.get_access_policy(access_policy_id=test_access_policy_oci_service_mesh_access_policy["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ServiceMesh"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ServiceMesh.GetAccessPolicy(ctx, &servicemesh.GetAccessPolicyArgs{
AccessPolicyId: testAccessPolicyOciServiceMeshAccessPolicy.Id,
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;
return await Deployment.RunAsync(() =>
{
var testAccessPolicy = Oci.ServiceMesh.GetAccessPolicy.Invoke(new()
{
AccessPolicyId = testAccessPolicyOciServiceMeshAccessPolicy.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ServiceMesh.ServiceMeshFunctions;
import com.pulumi.oci.ServiceMesh.inputs.GetAccessPolicyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var testAccessPolicy = ServiceMeshFunctions.getAccessPolicy(GetAccessPolicyArgs.builder()
.accessPolicyId(testAccessPolicyOciServiceMeshAccessPolicy.id())
.build());
}
}
variables:
testAccessPolicy:
fn::invoke:
Function: oci:ServiceMesh:getAccessPolicy
Arguments:
accessPolicyId: ${testAccessPolicyOciServiceMeshAccessPolicy.id}
Using getAccessPolicy
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 getAccessPolicy(args: GetAccessPolicyArgs, opts?: InvokeOptions): Promise<GetAccessPolicyResult>
function getAccessPolicyOutput(args: GetAccessPolicyOutputArgs, opts?: InvokeOptions): Output<GetAccessPolicyResult>
def get_access_policy(access_policy_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetAccessPolicyResult
def get_access_policy_output(access_policy_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetAccessPolicyResult]
func GetAccessPolicy(ctx *Context, args *GetAccessPolicyArgs, opts ...InvokeOption) (*GetAccessPolicyResult, error)
func GetAccessPolicyOutput(ctx *Context, args *GetAccessPolicyOutputArgs, opts ...InvokeOption) GetAccessPolicyResultOutput
> Note: This function is named GetAccessPolicy
in the Go SDK.
public static class GetAccessPolicy
{
public static Task<GetAccessPolicyResult> InvokeAsync(GetAccessPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetAccessPolicyResult> Invoke(GetAccessPolicyInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetAccessPolicyResult> getAccessPolicy(GetAccessPolicyArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ServiceMesh/getAccessPolicy:getAccessPolicy
arguments:
# arguments dictionary
The following arguments are supported:
- Access
Policy stringId - Unique AccessPolicy identifier.
- Access
Policy stringId - Unique AccessPolicy identifier.
- access
Policy StringId - Unique AccessPolicy identifier.
- access
Policy stringId - Unique AccessPolicy identifier.
- access_
policy_ strid - Unique AccessPolicy identifier.
- access
Policy StringId - Unique AccessPolicy identifier.
getAccessPolicy Result
The following output properties are available:
- Access
Policy stringId - Compartment
Id string - The OCID of the compartment.
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- Dictionary<string, string>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Id string
- Unique identifier that is immutable on creation.
- Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- Mesh
Id string - The OCID of the service mesh in which this access policy is created.
- Name string
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- Rules
List<Get
Access Policy Rule> - List of applicable rules.
- State string
- The current state of the Resource.
- Dictionary<string, string>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when this resource was created in an RFC3339 formatted datetime string.
- Time
Updated string - The time when this resource was updated in an RFC3339 formatted datetime string.
- Access
Policy stringId - Compartment
Id string - The OCID of the compartment.
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- Description string
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- map[string]string
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- Id string
- Unique identifier that is immutable on creation.
- Lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- Mesh
Id string - The OCID of the service mesh in which this access policy is created.
- Name string
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- Rules
[]Get
Access Policy Rule - List of applicable rules.
- State string
- The current state of the Resource.
- map[string]string
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- Time
Created string - The time when this resource was created in an RFC3339 formatted datetime string.
- Time
Updated string - The time when this resource was updated in an RFC3339 formatted datetime string.
- access
Policy StringId - compartment
Id String - The OCID of the compartment.
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- Map<String,String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id String
- Unique identifier that is immutable on creation.
- lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- mesh
Id String - The OCID of the service mesh in which this access policy is created.
- name String
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- rules
List<Get
Access Policy Rule> - List of applicable rules.
- state String
- The current state of the Resource.
- Map<String,String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when this resource was created in an RFC3339 formatted datetime string.
- time
Updated String - The time when this resource was updated in an RFC3339 formatted datetime string.
- access
Policy stringId - compartment
Id string - The OCID of the compartment.
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description string
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- {[key: string]: string}
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id string
- Unique identifier that is immutable on creation.
- lifecycle
Details string - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- mesh
Id string - The OCID of the service mesh in which this access policy is created.
- name string
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- rules
Get
Access Policy Rule[] - List of applicable rules.
- state string
- The current state of the Resource.
- {[key: string]: string}
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created string - The time when this resource was created in an RFC3339 formatted datetime string.
- time
Updated string - The time when this resource was updated in an RFC3339 formatted datetime string.
- access_
policy_ strid - compartment_
id str - The OCID of the compartment.
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description str
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- Mapping[str, str]
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id str
- Unique identifier that is immutable on creation.
- lifecycle_
details str - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- mesh_
id str - The OCID of the service mesh in which this access policy is created.
- name str
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- rules
Sequence[servicemesh.
Get Access Policy Rule] - List of applicable rules.
- state str
- The current state of the Resource.
- Mapping[str, str]
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time_
created str - The time when this resource was created in an RFC3339 formatted datetime string.
- time_
updated str - The time when this resource was updated in an RFC3339 formatted datetime string.
- access
Policy StringId - compartment
Id String - The OCID of the compartment.
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. Example:
{"foo-namespace.bar-key": "value"}
- description String
- Description of the resource. It can be changed after creation. Avoid entering confidential information. Example:
This is my new resource
- Map<String>
- Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example:
{"bar-key": "value"}
- id String
- Unique identifier that is immutable on creation.
- lifecycle
Details String - A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in a Failed state.
- mesh
Id String - The OCID of the service mesh in which this access policy is created.
- name String
- A user-friendly name. The name has to be unique within the same service mesh and cannot be changed after creation. Avoid entering confidential information. Example:
My unique resource name
- rules List<Property Map>
- List of applicable rules.
- state String
- The current state of the Resource.
- Map<String>
- Usage of system tag keys. These predefined keys are scoped to namespaces. Example:
{"orcl-cloud.free-tier-retained": "true"}
- time
Created String - The time when this resource was created in an RFC3339 formatted datetime string.
- time
Updated String - The time when this resource was updated in an RFC3339 formatted datetime string.
Supporting Types
GetAccessPolicyRule
- Action string
- Action for the traffic between the source and the destination.
- Destinations
List<Get
Access Policy Rule Destination> - Target of the access policy. This can either be the source or the destination of the traffic.
- Sources
List<Get
Access Policy Rule Source> - Target of the access policy. This can either be the source or the destination of the traffic.
- Action string
- Action for the traffic between the source and the destination.
- Destinations
[]Get
Access Policy Rule Destination - Target of the access policy. This can either be the source or the destination of the traffic.
- Sources
[]Get
Access Policy Rule Source - Target of the access policy. This can either be the source or the destination of the traffic.
- action String
- Action for the traffic between the source and the destination.
- destinations
List<Get
Access Policy Rule Destination> - Target of the access policy. This can either be the source or the destination of the traffic.
- sources
List<Get
Access Policy Rule Source> - Target of the access policy. This can either be the source or the destination of the traffic.
- action string
- Action for the traffic between the source and the destination.
- destinations
Get
Access Policy Rule Destination[] - Target of the access policy. This can either be the source or the destination of the traffic.
- sources
Get
Access Policy Rule Source[] - Target of the access policy. This can either be the source or the destination of the traffic.
- action str
- Action for the traffic between the source and the destination.
- destinations
Sequence[servicemesh.
Get Access Policy Rule Destination] - Target of the access policy. This can either be the source or the destination of the traffic.
- sources
Sequence[servicemesh.
Get Access Policy Rule Source] - Target of the access policy. This can either be the source or the destination of the traffic.
- action String
- Action for the traffic between the source and the destination.
- destinations List<Property Map>
- Target of the access policy. This can either be the source or the destination of the traffic.
- sources List<Property Map>
- Target of the access policy. This can either be the source or the destination of the traffic.
GetAccessPolicyRuleDestination
- Hostnames List<string>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- Ingress
Gateway stringId - The OCID of the ingress gateway resource.
- Ip
Addresses List<string> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- Ports List<int>
- Ports exposed by an external service. If left empty all ports will be allowed.
- Protocol string
- Protocol of the external service
- Type string
- Traffic type of the target.
- Virtual
Service stringId - The OCID of the virtual service resource.
- Hostnames []string
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- Ingress
Gateway stringId - The OCID of the ingress gateway resource.
- Ip
Addresses []string - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- Ports []int
- Ports exposed by an external service. If left empty all ports will be allowed.
- Protocol string
- Protocol of the external service
- Type string
- Traffic type of the target.
- Virtual
Service stringId - The OCID of the virtual service resource.
- hostnames List<String>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway StringId - The OCID of the ingress gateway resource.
- ip
Addresses List<String> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports List<Integer>
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol String
- Protocol of the external service
- type String
- Traffic type of the target.
- virtual
Service StringId - The OCID of the virtual service resource.
- hostnames string[]
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway stringId - The OCID of the ingress gateway resource.
- ip
Addresses string[] - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports number[]
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol string
- Protocol of the external service
- type string
- Traffic type of the target.
- virtual
Service stringId - The OCID of the virtual service resource.
- hostnames Sequence[str]
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress_
gateway_ strid - The OCID of the ingress gateway resource.
- ip_
addresses Sequence[str] - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports Sequence[int]
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol str
- Protocol of the external service
- type str
- Traffic type of the target.
- virtual_
service_ strid - The OCID of the virtual service resource.
- hostnames List<String>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway StringId - The OCID of the ingress gateway resource.
- ip
Addresses List<String> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports List<Number>
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol String
- Protocol of the external service
- type String
- Traffic type of the target.
- virtual
Service StringId - The OCID of the virtual service resource.
GetAccessPolicyRuleSource
- Hostnames List<string>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- Ingress
Gateway stringId - The OCID of the ingress gateway resource.
- Ip
Addresses List<string> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- Ports List<int>
- Ports exposed by an external service. If left empty all ports will be allowed.
- Protocol string
- Protocol of the external service
- Type string
- Traffic type of the target.
- Virtual
Service stringId - The OCID of the virtual service resource.
- Hostnames []string
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- Ingress
Gateway stringId - The OCID of the ingress gateway resource.
- Ip
Addresses []string - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- Ports []int
- Ports exposed by an external service. If left empty all ports will be allowed.
- Protocol string
- Protocol of the external service
- Type string
- Traffic type of the target.
- Virtual
Service stringId - The OCID of the virtual service resource.
- hostnames List<String>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway StringId - The OCID of the ingress gateway resource.
- ip
Addresses List<String> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports List<Integer>
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol String
- Protocol of the external service
- type String
- Traffic type of the target.
- virtual
Service StringId - The OCID of the virtual service resource.
- hostnames string[]
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway stringId - The OCID of the ingress gateway resource.
- ip
Addresses string[] - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports number[]
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol string
- Protocol of the external service
- type string
- Traffic type of the target.
- virtual
Service stringId - The OCID of the virtual service resource.
- hostnames Sequence[str]
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress_
gateway_ strid - The OCID of the ingress gateway resource.
- ip_
addresses Sequence[str] - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports Sequence[int]
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol str
- Protocol of the external service
- type str
- Traffic type of the target.
- virtual_
service_ strid - The OCID of the virtual service resource.
- hostnames List<String>
- The hostnames of the external service. Only applicable for HTTP and HTTPS protocols. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com", "". Hostname "" can be used to allow all hosts.
- ingress
Gateway StringId - The OCID of the ingress gateway resource.
- ip
Addresses List<String> - The ipAddresses of the external service in CIDR notation. Only applicable for TCP protocol. All requests matching the given CIDR notation will pass through. In case a wildcard CIDR "0.0.0.0/0" is provided, the same port cannot be used for a virtual service communication.
- ports List<Number>
- Ports exposed by an external service. If left empty all ports will be allowed.
- protocol String
- Protocol of the external service
- type String
- Traffic type of the target.
- virtual
Service StringId - The OCID of the virtual service resource.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.