1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ServiceMesh
  5. AccessPolicy
Oracle Cloud Infrastructure v2.31.0 published on Thursday, Apr 17, 2025 by Pulumi

oci.ServiceMesh.AccessPolicy

Explore with Pulumi AI

This resource provides the Access Policy resource in Oracle Cloud Infrastructure Service Mesh service.

Creates a new AccessPolicy.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testAccessPolicy = new oci.servicemesh.AccessPolicy("test_access_policy", {
    compartmentId: compartmentId,
    meshId: testMesh.id,
    name: accessPolicyName,
    rules: [{
        action: accessPolicyRulesAction,
        destination: {
            type: accessPolicyRulesDestinationType,
            hostnames: accessPolicyRulesDestinationHostnames,
            ingressGatewayId: testIngressGateway.id,
            ipAddresses: accessPolicyRulesDestinationIpAddresses,
            ports: accessPolicyRulesDestinationPorts,
            protocol: accessPolicyRulesDestinationProtocol,
            virtualServiceId: testVirtualService.id,
        },
        source: {
            type: accessPolicyRulesSourceType,
            hostnames: accessPolicyRulesSourceHostnames,
            ingressGatewayId: testIngressGateway.id,
            ipAddresses: accessPolicyRulesSourceIpAddresses,
            ports: accessPolicyRulesSourcePorts,
            protocol: accessPolicyRulesSourceProtocol,
            virtualServiceId: testVirtualService.id,
        },
    }],
    definedTags: {
        "foo-namespace.bar-key": "value",
    },
    description: accessPolicyDescription,
    freeformTags: {
        "bar-key": "value",
    },
});
Copy
import pulumi
import pulumi_oci as oci

test_access_policy = oci.service_mesh.AccessPolicy("test_access_policy",
    compartment_id=compartment_id,
    mesh_id=test_mesh["id"],
    name=access_policy_name,
    rules=[{
        "action": access_policy_rules_action,
        "destination": {
            "type": access_policy_rules_destination_type,
            "hostnames": access_policy_rules_destination_hostnames,
            "ingress_gateway_id": test_ingress_gateway["id"],
            "ip_addresses": access_policy_rules_destination_ip_addresses,
            "ports": access_policy_rules_destination_ports,
            "protocol": access_policy_rules_destination_protocol,
            "virtual_service_id": test_virtual_service["id"],
        },
        "source": {
            "type": access_policy_rules_source_type,
            "hostnames": access_policy_rules_source_hostnames,
            "ingress_gateway_id": test_ingress_gateway["id"],
            "ip_addresses": access_policy_rules_source_ip_addresses,
            "ports": access_policy_rules_source_ports,
            "protocol": access_policy_rules_source_protocol,
            "virtual_service_id": test_virtual_service["id"],
        },
    }],
    defined_tags={
        "foo-namespace.bar-key": "value",
    },
    description=access_policy_description,
    freeform_tags={
        "bar-key": "value",
    })
Copy
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.NewAccessPolicy(ctx, "test_access_policy", &servicemesh.AccessPolicyArgs{
			CompartmentId: pulumi.Any(compartmentId),
			MeshId:        pulumi.Any(testMesh.Id),
			Name:          pulumi.Any(accessPolicyName),
			Rules: servicemesh.AccessPolicyRuleArray{
				&servicemesh.AccessPolicyRuleArgs{
					Action: pulumi.Any(accessPolicyRulesAction),
					Destination: &servicemesh.AccessPolicyRuleDestinationArgs{
						Type:             pulumi.Any(accessPolicyRulesDestinationType),
						Hostnames:        pulumi.Any(accessPolicyRulesDestinationHostnames),
						IngressGatewayId: pulumi.Any(testIngressGateway.Id),
						IpAddresses:      pulumi.Any(accessPolicyRulesDestinationIpAddresses),
						Ports:            pulumi.Any(accessPolicyRulesDestinationPorts),
						Protocol:         pulumi.Any(accessPolicyRulesDestinationProtocol),
						VirtualServiceId: pulumi.Any(testVirtualService.Id),
					},
					Source: &servicemesh.AccessPolicyRuleSourceArgs{
						Type:             pulumi.Any(accessPolicyRulesSourceType),
						Hostnames:        pulumi.Any(accessPolicyRulesSourceHostnames),
						IngressGatewayId: pulumi.Any(testIngressGateway.Id),
						IpAddresses:      pulumi.Any(accessPolicyRulesSourceIpAddresses),
						Ports:            pulumi.Any(accessPolicyRulesSourcePorts),
						Protocol:         pulumi.Any(accessPolicyRulesSourceProtocol),
						VirtualServiceId: pulumi.Any(testVirtualService.Id),
					},
				},
			},
			DefinedTags: pulumi.StringMap{
				"foo-namespace.bar-key": pulumi.String("value"),
			},
			Description: pulumi.Any(accessPolicyDescription),
			FreeformTags: pulumi.StringMap{
				"bar-key": pulumi.String("value"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Oci = Pulumi.Oci;

return await Deployment.RunAsync(() => 
{
    var testAccessPolicy = new Oci.ServiceMesh.AccessPolicy("test_access_policy", new()
    {
        CompartmentId = compartmentId,
        MeshId = testMesh.Id,
        Name = accessPolicyName,
        Rules = new[]
        {
            new Oci.ServiceMesh.Inputs.AccessPolicyRuleArgs
            {
                Action = accessPolicyRulesAction,
                Destination = new Oci.ServiceMesh.Inputs.AccessPolicyRuleDestinationArgs
                {
                    Type = accessPolicyRulesDestinationType,
                    Hostnames = accessPolicyRulesDestinationHostnames,
                    IngressGatewayId = testIngressGateway.Id,
                    IpAddresses = accessPolicyRulesDestinationIpAddresses,
                    Ports = accessPolicyRulesDestinationPorts,
                    Protocol = accessPolicyRulesDestinationProtocol,
                    VirtualServiceId = testVirtualService.Id,
                },
                Source = new Oci.ServiceMesh.Inputs.AccessPolicyRuleSourceArgs
                {
                    Type = accessPolicyRulesSourceType,
                    Hostnames = accessPolicyRulesSourceHostnames,
                    IngressGatewayId = testIngressGateway.Id,
                    IpAddresses = accessPolicyRulesSourceIpAddresses,
                    Ports = accessPolicyRulesSourcePorts,
                    Protocol = accessPolicyRulesSourceProtocol,
                    VirtualServiceId = testVirtualService.Id,
                },
            },
        },
        DefinedTags = 
        {
            { "foo-namespace.bar-key", "value" },
        },
        Description = accessPolicyDescription,
        FreeformTags = 
        {
            { "bar-key", "value" },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ServiceMesh.AccessPolicy;
import com.pulumi.oci.ServiceMesh.AccessPolicyArgs;
import com.pulumi.oci.ServiceMesh.inputs.AccessPolicyRuleArgs;
import com.pulumi.oci.ServiceMesh.inputs.AccessPolicyRuleDestinationArgs;
import com.pulumi.oci.ServiceMesh.inputs.AccessPolicyRuleSourceArgs;
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) {
        var testAccessPolicy = new AccessPolicy("testAccessPolicy", AccessPolicyArgs.builder()
            .compartmentId(compartmentId)
            .meshId(testMesh.id())
            .name(accessPolicyName)
            .rules(AccessPolicyRuleArgs.builder()
                .action(accessPolicyRulesAction)
                .destination(AccessPolicyRuleDestinationArgs.builder()
                    .type(accessPolicyRulesDestinationType)
                    .hostnames(accessPolicyRulesDestinationHostnames)
                    .ingressGatewayId(testIngressGateway.id())
                    .ipAddresses(accessPolicyRulesDestinationIpAddresses)
                    .ports(accessPolicyRulesDestinationPorts)
                    .protocol(accessPolicyRulesDestinationProtocol)
                    .virtualServiceId(testVirtualService.id())
                    .build())
                .source(AccessPolicyRuleSourceArgs.builder()
                    .type(accessPolicyRulesSourceType)
                    .hostnames(accessPolicyRulesSourceHostnames)
                    .ingressGatewayId(testIngressGateway.id())
                    .ipAddresses(accessPolicyRulesSourceIpAddresses)
                    .ports(accessPolicyRulesSourcePorts)
                    .protocol(accessPolicyRulesSourceProtocol)
                    .virtualServiceId(testVirtualService.id())
                    .build())
                .build())
            .definedTags(Map.of("foo-namespace.bar-key", "value"))
            .description(accessPolicyDescription)
            .freeformTags(Map.of("bar-key", "value"))
            .build());

    }
}
Copy
resources:
  testAccessPolicy:
    type: oci:ServiceMesh:AccessPolicy
    name: test_access_policy
    properties:
      compartmentId: ${compartmentId}
      meshId: ${testMesh.id}
      name: ${accessPolicyName}
      rules:
        - action: ${accessPolicyRulesAction}
          destination:
            type: ${accessPolicyRulesDestinationType}
            hostnames: ${accessPolicyRulesDestinationHostnames}
            ingressGatewayId: ${testIngressGateway.id}
            ipAddresses: ${accessPolicyRulesDestinationIpAddresses}
            ports: ${accessPolicyRulesDestinationPorts}
            protocol: ${accessPolicyRulesDestinationProtocol}
            virtualServiceId: ${testVirtualService.id}
          source:
            type: ${accessPolicyRulesSourceType}
            hostnames: ${accessPolicyRulesSourceHostnames}
            ingressGatewayId: ${testIngressGateway.id}
            ipAddresses: ${accessPolicyRulesSourceIpAddresses}
            ports: ${accessPolicyRulesSourcePorts}
            protocol: ${accessPolicyRulesSourceProtocol}
            virtualServiceId: ${testVirtualService.id}
      definedTags:
        foo-namespace.bar-key: value
      description: ${accessPolicyDescription}
      freeformTags:
        bar-key: value
Copy

Create AccessPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AccessPolicy(name: string, args: AccessPolicyArgs, opts?: CustomResourceOptions);
@overload
def AccessPolicy(resource_name: str,
                 args: AccessPolicyArgs,
                 opts: Optional[ResourceOptions] = None)

@overload
def AccessPolicy(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 compartment_id: Optional[str] = None,
                 mesh_id: Optional[str] = None,
                 rules: Optional[Sequence[_servicemesh.AccessPolicyRuleArgs]] = None,
                 defined_tags: Optional[Mapping[str, str]] = None,
                 description: Optional[str] = None,
                 freeform_tags: Optional[Mapping[str, str]] = None,
                 name: Optional[str] = None)
func NewAccessPolicy(ctx *Context, name string, args AccessPolicyArgs, opts ...ResourceOption) (*AccessPolicy, error)
public AccessPolicy(string name, AccessPolicyArgs args, CustomResourceOptions? opts = null)
public AccessPolicy(String name, AccessPolicyArgs args)
public AccessPolicy(String name, AccessPolicyArgs args, CustomResourceOptions options)
type: oci:ServiceMesh:AccessPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AccessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AccessPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AccessPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AccessPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AccessPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var accessPolicyResource = new Oci.ServiceMesh.AccessPolicy("accessPolicyResource", new()
{
    CompartmentId = "string",
    MeshId = "string",
    Rules = new[]
    {
        new Oci.ServiceMesh.Inputs.AccessPolicyRuleArgs
        {
            Action = "string",
            Destination = new Oci.ServiceMesh.Inputs.AccessPolicyRuleDestinationArgs
            {
                Type = "string",
                Hostnames = new[]
                {
                    "string",
                },
                IngressGatewayId = "string",
                IpAddresses = new[]
                {
                    "string",
                },
                Ports = new[]
                {
                    0,
                },
                Protocol = "string",
                VirtualServiceId = "string",
            },
            Source = new Oci.ServiceMesh.Inputs.AccessPolicyRuleSourceArgs
            {
                Type = "string",
                Hostnames = new[]
                {
                    "string",
                },
                IngressGatewayId = "string",
                IpAddresses = new[]
                {
                    "string",
                },
                Ports = new[]
                {
                    0,
                },
                Protocol = "string",
                VirtualServiceId = "string",
            },
        },
    },
    DefinedTags = 
    {
        { "string", "string" },
    },
    Description = "string",
    FreeformTags = 
    {
        { "string", "string" },
    },
    Name = "string",
});
Copy
example, err := servicemesh.NewAccessPolicy(ctx, "accessPolicyResource", &servicemesh.AccessPolicyArgs{
	CompartmentId: pulumi.String("string"),
	MeshId:        pulumi.String("string"),
	Rules: servicemesh.AccessPolicyRuleArray{
		&servicemesh.AccessPolicyRuleArgs{
			Action: pulumi.String("string"),
			Destination: &servicemesh.AccessPolicyRuleDestinationArgs{
				Type: pulumi.String("string"),
				Hostnames: pulumi.StringArray{
					pulumi.String("string"),
				},
				IngressGatewayId: pulumi.String("string"),
				IpAddresses: pulumi.StringArray{
					pulumi.String("string"),
				},
				Ports: pulumi.IntArray{
					pulumi.Int(0),
				},
				Protocol:         pulumi.String("string"),
				VirtualServiceId: pulumi.String("string"),
			},
			Source: &servicemesh.AccessPolicyRuleSourceArgs{
				Type: pulumi.String("string"),
				Hostnames: pulumi.StringArray{
					pulumi.String("string"),
				},
				IngressGatewayId: pulumi.String("string"),
				IpAddresses: pulumi.StringArray{
					pulumi.String("string"),
				},
				Ports: pulumi.IntArray{
					pulumi.Int(0),
				},
				Protocol:         pulumi.String("string"),
				VirtualServiceId: pulumi.String("string"),
			},
		},
	},
	DefinedTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Description: pulumi.String("string"),
	FreeformTags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	Name: pulumi.String("string"),
})
Copy
var accessPolicyResource = new AccessPolicy("accessPolicyResource", AccessPolicyArgs.builder()
    .compartmentId("string")
    .meshId("string")
    .rules(AccessPolicyRuleArgs.builder()
        .action("string")
        .destination(AccessPolicyRuleDestinationArgs.builder()
            .type("string")
            .hostnames("string")
            .ingressGatewayId("string")
            .ipAddresses("string")
            .ports(0)
            .protocol("string")
            .virtualServiceId("string")
            .build())
        .source(AccessPolicyRuleSourceArgs.builder()
            .type("string")
            .hostnames("string")
            .ingressGatewayId("string")
            .ipAddresses("string")
            .ports(0)
            .protocol("string")
            .virtualServiceId("string")
            .build())
        .build())
    .definedTags(Map.of("string", "string"))
    .description("string")
    .freeformTags(Map.of("string", "string"))
    .name("string")
    .build());
Copy
access_policy_resource = oci.service_mesh.AccessPolicy("accessPolicyResource",
    compartment_id="string",
    mesh_id="string",
    rules=[{
        "action": "string",
        "destination": {
            "type": "string",
            "hostnames": ["string"],
            "ingress_gateway_id": "string",
            "ip_addresses": ["string"],
            "ports": [0],
            "protocol": "string",
            "virtual_service_id": "string",
        },
        "source": {
            "type": "string",
            "hostnames": ["string"],
            "ingress_gateway_id": "string",
            "ip_addresses": ["string"],
            "ports": [0],
            "protocol": "string",
            "virtual_service_id": "string",
        },
    }],
    defined_tags={
        "string": "string",
    },
    description="string",
    freeform_tags={
        "string": "string",
    },
    name="string")
Copy
const accessPolicyResource = new oci.servicemesh.AccessPolicy("accessPolicyResource", {
    compartmentId: "string",
    meshId: "string",
    rules: [{
        action: "string",
        destination: {
            type: "string",
            hostnames: ["string"],
            ingressGatewayId: "string",
            ipAddresses: ["string"],
            ports: [0],
            protocol: "string",
            virtualServiceId: "string",
        },
        source: {
            type: "string",
            hostnames: ["string"],
            ingressGatewayId: "string",
            ipAddresses: ["string"],
            ports: [0],
            protocol: "string",
            virtualServiceId: "string",
        },
    }],
    definedTags: {
        string: "string",
    },
    description: "string",
    freeformTags: {
        string: "string",
    },
    name: "string",
});
Copy
type: oci:ServiceMesh:AccessPolicy
properties:
    compartmentId: string
    definedTags:
        string: string
    description: string
    freeformTags:
        string: string
    meshId: string
    name: string
    rules:
        - action: string
          destination:
            hostnames:
                - string
            ingressGatewayId: string
            ipAddresses:
                - string
            ports:
                - 0
            protocol: string
            type: string
            virtualServiceId: string
          source:
            hostnames:
                - string
            ingressGatewayId: string
            ipAddresses:
                - string
            ports:
                - 0
            protocol: string
            type: string
            virtualServiceId: string
Copy

AccessPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AccessPolicy resource accepts the following input properties:

CompartmentId This property is required. string
(Updatable) The OCID of the compartment.
MeshId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the service mesh in which this access policy is created.
Rules This property is required. List<AccessPolicyRule>
(Updatable) List of applicable rules
DefinedTags Dictionary<string, string>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
FreeformTags Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Name Changes to this property will trigger replacement. 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
CompartmentId This property is required. string
(Updatable) The OCID of the compartment.
MeshId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the service mesh in which this access policy is created.
Rules This property is required. []AccessPolicyRuleArgs
(Updatable) List of applicable rules
DefinedTags map[string]string
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
FreeformTags map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
Name Changes to this property will trigger replacement. 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
compartmentId This property is required. String
(Updatable) The OCID of the compartment.
meshId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the service mesh in which this access policy is created.
rules This property is required. List<AccessPolicyRule>
(Updatable) List of applicable rules
definedTags Map<String,String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
name Changes to this property will trigger replacement. 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
compartmentId This property is required. string
(Updatable) The OCID of the compartment.
meshId
This property is required.
Changes to this property will trigger replacement.
string
The OCID of the service mesh in which this access policy is created.
rules This property is required. AccessPolicyRule[]
(Updatable) List of applicable rules
definedTags {[key: string]: string}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
name Changes to this property will trigger replacement. 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
compartment_id This property is required. str
(Updatable) The OCID of the compartment.
mesh_id
This property is required.
Changes to this property will trigger replacement.
str
The OCID of the service mesh in which this access policy is created.
rules This property is required. Sequence[servicemesh.AccessPolicyRuleArgs]
(Updatable) List of applicable rules
defined_tags Mapping[str, str]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description str
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeform_tags Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
name Changes to this property will trigger replacement. 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
compartmentId This property is required. String
(Updatable) The OCID of the compartment.
meshId
This property is required.
Changes to this property will trigger replacement.
String
The OCID of the service mesh in which this access policy is created.
rules This property is required. List<Property Map>
(Updatable) List of applicable rules
definedTags Map<String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
name Changes to this property will trigger replacement. 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

Outputs

All input properties are implicitly available as output properties. Additionally, the AccessPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
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.
State string
The current state of the Resource.
SystemTags Dictionary<string, string>
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.
Id string
The provider-assigned unique ID for this managed resource.
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.
State string
The current state of the Resource.
SystemTags map[string]string
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.
id String
The provider-assigned unique ID for this managed resource.
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.
state String
The current state of the Resource.
systemTags Map<String,String>
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.
id string
The provider-assigned unique ID for this managed resource.
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.
state string
The current state of the Resource.
systemTags {[key: string]: string}
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.
id str
The provider-assigned unique ID for this managed resource.
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.
state str
The current state of the Resource.
system_tags 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.
id String
The provider-assigned unique ID for this managed resource.
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.
state String
The current state of the Resource.
systemTags Map<String>
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.

Look up Existing AccessPolicy Resource

Get an existing AccessPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: AccessPolicyState, opts?: CustomResourceOptions): AccessPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        compartment_id: Optional[str] = None,
        defined_tags: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        freeform_tags: Optional[Mapping[str, str]] = None,
        lifecycle_details: Optional[str] = None,
        mesh_id: Optional[str] = None,
        name: Optional[str] = None,
        rules: Optional[Sequence[_servicemesh.AccessPolicyRuleArgs]] = None,
        state: Optional[str] = None,
        system_tags: Optional[Mapping[str, str]] = None,
        time_created: Optional[str] = None,
        time_updated: Optional[str] = None) -> AccessPolicy
func GetAccessPolicy(ctx *Context, name string, id IDInput, state *AccessPolicyState, opts ...ResourceOption) (*AccessPolicy, error)
public static AccessPolicy Get(string name, Input<string> id, AccessPolicyState? state, CustomResourceOptions? opts = null)
public static AccessPolicy get(String name, Output<String> id, AccessPolicyState state, CustomResourceOptions options)
resources:  _:    type: oci:ServiceMesh:AccessPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
CompartmentId string
(Updatable) The OCID of the compartment.
DefinedTags Dictionary<string, string>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
FreeformTags Dictionary<string, string>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. string
The OCID of the service mesh in which this access policy is created.
Name Changes to this property will trigger replacement. 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<AccessPolicyRule>
(Updatable) List of applicable rules
State string
The current state of the Resource.
SystemTags Dictionary<string, string>
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.
CompartmentId string
(Updatable) The OCID of the compartment.
DefinedTags map[string]string
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
Description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
FreeformTags map[string]string
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. string
The OCID of the service mesh in which this access policy is created.
Name Changes to this property will trigger replacement. 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 []AccessPolicyRuleArgs
(Updatable) List of applicable rules
State string
The current state of the Resource.
SystemTags map[string]string
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.
compartmentId String
(Updatable) The OCID of the compartment.
definedTags Map<String,String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags Map<String,String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. String
The OCID of the service mesh in which this access policy is created.
name Changes to this property will trigger replacement. 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<AccessPolicyRule>
(Updatable) List of applicable rules
state String
The current state of the Resource.
systemTags Map<String,String>
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.
compartmentId string
(Updatable) The OCID of the compartment.
definedTags {[key: string]: string}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description string
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags {[key: string]: string}
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. string
The OCID of the service mesh in which this access policy is created.
name Changes to this property will trigger replacement. 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 AccessPolicyRule[]
(Updatable) List of applicable rules
state string
The current state of the Resource.
systemTags {[key: string]: string}
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.
compartment_id str
(Updatable) The OCID of the compartment.
defined_tags Mapping[str, str]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description str
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeform_tags Mapping[str, str]
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. str
The OCID of the service mesh in which this access policy is created.
name Changes to this property will trigger replacement. 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.AccessPolicyRuleArgs]
(Updatable) List of applicable rules
state str
The current state of the Resource.
system_tags 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.
compartmentId String
(Updatable) The OCID of the compartment.
definedTags Map<String>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}
description String
(Updatable) Description of the resource. It can be changed after creation. Avoid entering confidential information. Example: This is my new resource
freeformTags Map<String>
(Updatable) Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}
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 Changes to this property will trigger replacement. String
The OCID of the service mesh in which this access policy is created.
name Changes to this property will trigger replacement. 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>
(Updatable) List of applicable rules
state String
The current state of the Resource.
systemTags Map<String>
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

AccessPolicyRule
, AccessPolicyRuleArgs

Action This property is required. string
(Updatable) Action for the traffic between the source and the destination.
Destination This property is required. AccessPolicyRuleDestination
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
Source This property is required. AccessPolicyRuleSource
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
Action This property is required. string
(Updatable) Action for the traffic between the source and the destination.
Destination This property is required. AccessPolicyRuleDestination
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
Source This property is required. AccessPolicyRuleSource
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
action This property is required. String
(Updatable) Action for the traffic between the source and the destination.
destination This property is required. AccessPolicyRuleDestination
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
source This property is required. AccessPolicyRuleSource
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
action This property is required. string
(Updatable) Action for the traffic between the source and the destination.
destination This property is required. AccessPolicyRuleDestination
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
source This property is required. AccessPolicyRuleSource
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
action This property is required. str
(Updatable) Action for the traffic between the source and the destination.
destination This property is required. servicemesh.AccessPolicyRuleDestination
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
source This property is required. servicemesh.AccessPolicyRuleSource
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
action This property is required. String
(Updatable) Action for the traffic between the source and the destination.
destination This property is required. Property Map
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.
source This property is required. Property Map
(Updatable) Target of the access policy. This can either be the source or the destination of the traffic.

AccessPolicyRuleDestination
, AccessPolicyRuleDestinationArgs

Type This property is required. string
(Updatable) Traffic type of the target.
Hostnames List<string>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
IpAddresses List<string>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
Protocol string
(Updatable) Protocol of the external service
VirtualServiceId string
(Updatable) The OCID of the virtual service resource.
Type This property is required. string
(Updatable) Traffic type of the target.
Hostnames []string
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
IpAddresses []string
(Updatable) 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
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
Protocol string
(Updatable) Protocol of the external service
VirtualServiceId string
(Updatable) The OCID of the virtual service resource.
type This property is required. String
(Updatable) Traffic type of the target.
hostnames List<String>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses List<String>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol String
(Updatable) Protocol of the external service
virtualServiceId String
(Updatable) The OCID of the virtual service resource.
type This property is required. string
(Updatable) Traffic type of the target.
hostnames string[]
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses string[]
(Updatable) 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[]
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol string
(Updatable) Protocol of the external service
virtualServiceId string
(Updatable) The OCID of the virtual service resource.
type This property is required. str
(Updatable) Traffic type of the target.
hostnames Sequence[str]
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ip_addresses Sequence[str]
(Updatable) 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]
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol str
(Updatable) Protocol of the external service
virtual_service_id str
(Updatable) The OCID of the virtual service resource.
type This property is required. String
(Updatable) Traffic type of the target.
hostnames List<String>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses List<String>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol String
(Updatable) Protocol of the external service
virtualServiceId String
(Updatable) The OCID of the virtual service resource.

AccessPolicyRuleSource
, AccessPolicyRuleSourceArgs

Type This property is required. string
(Updatable) Traffic type of the target.
Hostnames List<string>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
IpAddresses List<string>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
Protocol string
(Updatable) Protocol of the external service
VirtualServiceId string

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Type This property is required. string
(Updatable) Traffic type of the target.
Hostnames []string
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
IpAddresses []string
(Updatable) 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
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
Protocol string
(Updatable) Protocol of the external service
VirtualServiceId string

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

type This property is required. String
(Updatable) Traffic type of the target.
hostnames List<String>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses List<String>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol String
(Updatable) Protocol of the external service
virtualServiceId String

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

type This property is required. string
(Updatable) Traffic type of the target.
hostnames string[]
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses string[]
(Updatable) 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[]
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol string
(Updatable) Protocol of the external service
virtualServiceId string

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

type This property is required. str
(Updatable) Traffic type of the target.
hostnames Sequence[str]
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ip_addresses Sequence[str]
(Updatable) 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]
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol str
(Updatable) Protocol of the external service
virtual_service_id str

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

type This property is required. String
(Updatable) Traffic type of the target.
hostnames List<String>
(Updatable) 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
(Updatable) The OCID of the ingress gateway resource.
ipAddresses List<String>
(Updatable) 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>
(Updatable) Ports exposed by an external service. If left empty all ports will be allowed.
protocol String
(Updatable) Protocol of the external service
virtualServiceId String

(Updatable) The OCID of the virtual service resource.

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Import

AccessPolicies can be imported using the id, e.g.

$ pulumi import oci:ServiceMesh/accessPolicy:AccessPolicy test_access_policy "id"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
oci pulumi/pulumi-oci
License
Apache-2.0
Notes
This Pulumi package is based on the oci Terraform Provider.