1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ServiceMesh
  5. getVirtualService
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.ServiceMesh.getVirtualService

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    This data source provides details about a specific Virtual Service resource in Oracle Cloud Infrastructure Service Mesh service.

    Gets a VirtualService by identifier.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testVirtualService = oci.ServiceMesh.getVirtualService({
        virtualServiceId: testVirtualServiceOciServiceMeshVirtualService.id,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_virtual_service = oci.ServiceMesh.get_virtual_service(virtual_service_id=test_virtual_service_oci_service_mesh_virtual_service["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.GetVirtualService(ctx, &servicemesh.GetVirtualServiceArgs{
    			VirtualServiceId: testVirtualServiceOciServiceMeshVirtualService.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 testVirtualService = Oci.ServiceMesh.GetVirtualService.Invoke(new()
        {
            VirtualServiceId = testVirtualServiceOciServiceMeshVirtualService.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.GetVirtualServiceArgs;
    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 testVirtualService = ServiceMeshFunctions.getVirtualService(GetVirtualServiceArgs.builder()
                .virtualServiceId(testVirtualServiceOciServiceMeshVirtualService.id())
                .build());
    
        }
    }
    
    variables:
      testVirtualService:
        fn::invoke:
          Function: oci:ServiceMesh:getVirtualService
          Arguments:
            virtualServiceId: ${testVirtualServiceOciServiceMeshVirtualService.id}
    

    Using getVirtualService

    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 getVirtualService(args: GetVirtualServiceArgs, opts?: InvokeOptions): Promise<GetVirtualServiceResult>
    function getVirtualServiceOutput(args: GetVirtualServiceOutputArgs, opts?: InvokeOptions): Output<GetVirtualServiceResult>
    def get_virtual_service(virtual_service_id: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetVirtualServiceResult
    def get_virtual_service_output(virtual_service_id: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetVirtualServiceResult]
    func GetVirtualService(ctx *Context, args *GetVirtualServiceArgs, opts ...InvokeOption) (*GetVirtualServiceResult, error)
    func GetVirtualServiceOutput(ctx *Context, args *GetVirtualServiceOutputArgs, opts ...InvokeOption) GetVirtualServiceResultOutput

    > Note: This function is named GetVirtualService in the Go SDK.

    public static class GetVirtualService 
    {
        public static Task<GetVirtualServiceResult> InvokeAsync(GetVirtualServiceArgs args, InvokeOptions? opts = null)
        public static Output<GetVirtualServiceResult> Invoke(GetVirtualServiceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetVirtualServiceResult> getVirtualService(GetVirtualServiceArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:ServiceMesh/getVirtualService:getVirtualService
      arguments:
        # arguments dictionary

    The following arguments are supported:

    VirtualServiceId string
    Unique VirtualService identifier.
    VirtualServiceId string
    Unique VirtualService identifier.
    virtualServiceId String
    Unique VirtualService identifier.
    virtualServiceId string
    Unique VirtualService identifier.
    virtual_service_id str
    Unique VirtualService identifier.
    virtualServiceId String
    Unique VirtualService identifier.

    getVirtualService Result

    The following output properties are available:

    CompartmentId string
    The OCID of the compartment.
    DefaultRoutingPolicies List<GetVirtualServiceDefaultRoutingPolicy>
    Routing policy for the virtual service.
    DefinedTags 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
    FreeformTags 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"}
    Hosts List<string>
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    Mtls List<GetVirtualServiceMtl>
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    VirtualServiceId string
    CompartmentId string
    The OCID of the compartment.
    DefaultRoutingPolicies []GetVirtualServiceDefaultRoutingPolicy
    Routing policy for the virtual service.
    DefinedTags 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
    FreeformTags 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"}
    Hosts []string
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    Mtls []GetVirtualServiceMtl
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    VirtualServiceId string
    compartmentId String
    The OCID of the compartment.
    defaultRoutingPolicies List<GetVirtualServiceDefaultRoutingPolicy>
    Routing policy for the virtual service.
    definedTags 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
    freeformTags 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"}
    hosts List<String>
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    mtls List<GetVirtualServiceMtl>
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    virtualServiceId String
    compartmentId string
    The OCID of the compartment.
    defaultRoutingPolicies GetVirtualServiceDefaultRoutingPolicy[]
    Routing policy for the virtual service.
    definedTags {[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
    freeformTags {[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"}
    hosts string[]
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    mtls GetVirtualServiceMtl[]
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    virtualServiceId string
    compartment_id str
    The OCID of the compartment.
    default_routing_policies Sequence[servicemesh.GetVirtualServiceDefaultRoutingPolicy]
    Routing policy for the virtual service.
    defined_tags 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
    freeform_tags 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"}
    hosts Sequence[str]
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    mtls Sequence[servicemesh.GetVirtualServiceMtl]
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    virtual_service_id str
    compartmentId String
    The OCID of the compartment.
    defaultRoutingPolicies List<Property Map>
    Routing policy for the virtual service.
    definedTags 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
    freeformTags 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"}
    hosts List<String>
    The DNS hostnames of the virtual service that is used by its callers. Wildcard hostnames are supported in the prefix form. Examples of valid hostnames are "www.example.com", ".example.com", ".com". Can be omitted if the virtual service will only have TCP virtual deployments.
    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 virtual service is created.
    mtls List<Property Map>
    Mutual TLS settings used when communicating with other virtual services or ingress gateways within the mesh.
    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
    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.
    virtualServiceId String

    Supporting Types

    GetVirtualServiceDefaultRoutingPolicy

    Type string
    Type of the virtual service routing policy.
    Type string
    Type of the virtual service routing policy.
    type String
    Type of the virtual service routing policy.
    type string
    Type of the virtual service routing policy.
    type str
    Type of the virtual service routing policy.
    type String
    Type of the virtual service routing policy.

    GetVirtualServiceMtl

    CertificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    MaximumValidity int
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    Mode string
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    CertificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    MaximumValidity int
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    Mode string
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId String
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity Integer
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode String
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId string
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity number
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode string
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificate_id str
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximum_validity int
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode str
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.
    certificateId String
    The OCID of the certificate resource that will be used for mTLS authentication with other virtual services in the mesh.
    maximumValidity Number
    The number of days the mTLS certificate is valid. This value should be less than the Maximum Validity Duration for Certificates (Days) setting on the Certificate Authority associated with this Mesh. The certificate will be automatically renewed after 2/3 of the validity period, so a certificate with a maximum validity of 45 days will be renewed every 30 days.
    mode String
    DISABLED: Connection is not tunneled. PERMISSIVE: Connection can be either plaintext or an mTLS tunnel. STRICT: Connection is an mTLS tunnel. Clients without a valid certificate will be rejected.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi