oci logo
Oracle Cloud Infrastructure v0.20.0, May 31 23

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

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 = oci_service_mesh_access_policy.Test_access_policy.Id,
    });

});
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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: oci_service_mesh_access_policy.Test_access_policy.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
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(oci_service_mesh_access_policy.test_access_policy().id())
            .build());

    }
}
import pulumi
import pulumi_oci as oci

test_access_policy = oci.ServiceMesh.get_access_policy(access_policy_id=%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAccessPolicy = oci.ServiceMesh.getAccessPolicy({
    accessPolicyId: oci_service_mesh_access_policy.test_access_policy.id,
});
variables:
  testAccessPolicy:
    fn::invoke:
      Function: oci:ServiceMesh:getAccessPolicy
      Arguments:
        accessPolicyId: ${oci_service_mesh_access_policy.test_access_policy.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:

AccessPolicyId string

Unique AccessPolicy identifier.

AccessPolicyId string

Unique AccessPolicy identifier.

accessPolicyId String

Unique AccessPolicy identifier.

accessPolicyId string

Unique AccessPolicy identifier.

access_policy_id str

Unique AccessPolicy identifier.

accessPolicyId String

Unique AccessPolicy identifier.

getAccessPolicy Result

The following output properties are available:

AccessPolicyId string
CompartmentId string

The OCID of the compartment.

DefinedTags Dictionary<string, object>

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

FreeformTags Dictionary<string, object>

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.

LifecycleDetails 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.

MeshId 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<GetAccessPolicyRule>

List of applicable rules.

State string

The current state of the Resource.

SystemTags Dictionary<string, object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The time when this resource was created in an RFC3339 formatted datetime string.

TimeUpdated string

The time when this resource was updated in an RFC3339 formatted datetime string.

AccessPolicyId string
CompartmentId string

The OCID of the compartment.

DefinedTags map[string]interface{}

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

FreeformTags map[string]interface{}

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.

LifecycleDetails 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.

MeshId 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 []GetAccessPolicyRule

List of applicable rules.

State string

The current state of the Resource.

SystemTags map[string]interface{}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

TimeCreated string

The time when this resource was created in an RFC3339 formatted datetime string.

TimeUpdated string

The time when this resource was updated in an RFC3339 formatted datetime string.

accessPolicyId String
compartmentId String

The OCID of the compartment.

definedTags Map<String,Object>

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

freeformTags Map<String,Object>

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.

lifecycleDetails 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.

meshId 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<GetAccessPolicyRule>

List of applicable rules.

state String

The current state of the Resource.

systemTags Map<String,Object>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The time when this resource was created in an RFC3339 formatted datetime string.

timeUpdated String

The time when this resource was updated in an RFC3339 formatted datetime string.

accessPolicyId string
compartmentId string

The OCID of the compartment.

definedTags {[key: string]: any}

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

freeformTags {[key: string]: any}

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.

lifecycleDetails 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.

meshId 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 GetAccessPolicyRule[]

List of applicable rules.

state string

The current state of the Resource.

systemTags {[key: string]: any}

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated string

The time when this resource was created in an RFC3339 formatted datetime string.

timeUpdated string

The time when this resource was updated in an RFC3339 formatted datetime string.

access_policy_id str
compartment_id str

The OCID of the compartment.

defined_tags Mapping[str, Any]

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

freeform_tags Mapping[str, Any]

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 GetAccessPolicyRule]

List of applicable rules.

state str

The current state of the Resource.

system_tags Mapping[str, Any]

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.

accessPolicyId String
compartmentId String

The OCID of the compartment.

definedTags Map<Any>

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

freeformTags Map<Any>

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.

lifecycleDetails 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.

meshId 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.

systemTags Map<Any>

Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

timeCreated String

The time when this resource was created in an RFC3339 formatted datetime string.

timeUpdated 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<GetAccessPolicyRuleDestination>

Target of the access policy. This can either be the source or the destination of the traffic.

Sources List<GetAccessPolicyRuleSource>

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 []GetAccessPolicyRuleDestination

Target of the access policy. This can either be the source or the destination of the traffic.

Sources []GetAccessPolicyRuleSource

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<GetAccessPolicyRuleDestination>

Target of the access policy. This can either be the source or the destination of the traffic.

sources List<GetAccessPolicyRuleSource>

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 GetAccessPolicyRuleDestination[]

Target of the access policy. This can either be the source or the destination of the traffic.

sources GetAccessPolicyRuleSource[]

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 GetAccessPolicyRuleDestination]

Target of the access policy. This can either be the source or the destination of the traffic.

sources GetAccessPolicyRuleSource]

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.

IngressGatewayId string

The OCID of the ingress gateway resource.

IpAddresses 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.

VirtualServiceId string

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.

IngressGatewayId string

The OCID of the ingress gateway resource.

IpAddresses []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.

VirtualServiceId string

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.

ingressGatewayId String

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId String

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.

ingressGatewayId string

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId string

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_id str

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_id str

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.

ingressGatewayId String

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId String

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.

IngressGatewayId string

The OCID of the ingress gateway resource.

IpAddresses 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.

VirtualServiceId string

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.

IngressGatewayId string

The OCID of the ingress gateway resource.

IpAddresses []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.

VirtualServiceId string

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.

ingressGatewayId String

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId String

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.

ingressGatewayId string

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId string

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_id str

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_id str

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.

ingressGatewayId String

The OCID of the ingress gateway resource.

ipAddresses 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.

virtualServiceId String

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.