oci.Dns.View
Explore with Pulumi AI
This resource provides the View resource in Oracle Cloud Infrastructure DNS service.
Creates a new view in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testView = new oci.dns.View("test_view", {
compartmentId: compartmentId,
scope: "PRIVATE",
definedTags: viewDefinedTags,
displayName: viewDisplayName,
freeformTags: viewFreeformTags,
});
import pulumi
import pulumi_oci as oci
test_view = oci.dns.View("test_view",
compartment_id=compartment_id,
scope="PRIVATE",
defined_tags=view_defined_tags,
display_name=view_display_name,
freeform_tags=view_freeform_tags)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Dns.NewView(ctx, "test_view", &Dns.ViewArgs{
CompartmentId: pulumi.Any(compartmentId),
Scope: pulumi.String("PRIVATE"),
DefinedTags: pulumi.Any(viewDefinedTags),
DisplayName: pulumi.Any(viewDisplayName),
FreeformTags: pulumi.Any(viewFreeformTags),
})
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 testView = new Oci.Dns.View("test_view", new()
{
CompartmentId = compartmentId,
Scope = "PRIVATE",
DefinedTags = viewDefinedTags,
DisplayName = viewDisplayName,
FreeformTags = viewFreeformTags,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Dns.View;
import com.pulumi.oci.Dns.ViewArgs;
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 testView = new View("testView", ViewArgs.builder()
.compartmentId(compartmentId)
.scope("PRIVATE")
.definedTags(viewDefinedTags)
.displayName(viewDisplayName)
.freeformTags(viewFreeformTags)
.build());
}
}
resources:
testView:
type: oci:Dns:View
name: test_view
properties:
compartmentId: ${compartmentId}
scope: PRIVATE
definedTags: ${viewDefinedTags}
displayName: ${viewDisplayName}
freeformTags: ${viewFreeformTags}
Create View Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new View(name: string, args: ViewArgs, opts?: CustomResourceOptions);
@overload
def View(resource_name: str,
args: ViewArgs,
opts: Optional[ResourceOptions] = None)
@overload
def View(resource_name: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
scope: Optional[str] = None)
func NewView(ctx *Context, name string, args ViewArgs, opts ...ResourceOption) (*View, error)
public View(string name, ViewArgs args, CustomResourceOptions? opts = null)
type: oci:Dns:View
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ViewArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ViewArgs
- 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 viewResource = new Oci.Dns.View("viewResource", new()
{
CompartmentId = "string",
DefinedTags =
{
{ "string", "any" },
},
DisplayName = "string",
FreeformTags =
{
{ "string", "any" },
},
Scope = "string",
});
example, err := Dns.NewView(ctx, "viewResource", &Dns.ViewArgs{
CompartmentId: pulumi.String("string"),
DefinedTags: pulumi.Map{
"string": pulumi.Any("any"),
},
DisplayName: pulumi.String("string"),
FreeformTags: pulumi.Map{
"string": pulumi.Any("any"),
},
Scope: pulumi.String("string"),
})
var viewResource = new View("viewResource", ViewArgs.builder()
.compartmentId("string")
.definedTags(Map.of("string", "any"))
.displayName("string")
.freeformTags(Map.of("string", "any"))
.scope("string")
.build());
view_resource = oci.dns.View("viewResource",
compartment_id="string",
defined_tags={
"string": "any",
},
display_name="string",
freeform_tags={
"string": "any",
},
scope="string")
const viewResource = new oci.dns.View("viewResource", {
compartmentId: "string",
definedTags: {
string: "any",
},
displayName: "string",
freeformTags: {
string: "any",
},
scope: "string",
});
type: oci:Dns:View
properties:
compartmentId: string
definedTags:
string: any
displayName: string
freeformTags:
string: any
scope: string
View Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The View resource accepts the following input properties:
- Compartment
Id string - (Updatable) The OCID of the owning compartment.
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- Display
Name string - (Updatable) The display name of the view.
- Dictionary<string, object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- Scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- Compartment
Id string - (Updatable) The OCID of the owning compartment.
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- Display
Name string - (Updatable) The display name of the view.
- map[string]interface{}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- Scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- compartment
Id String - (Updatable) The OCID of the owning compartment.
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name String - (Updatable) The display name of the view.
- Map<String,Object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- scope String
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- compartment
Id string - (Updatable) The OCID of the owning compartment.
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name string - (Updatable) The display name of the view.
- {[key: string]: any}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- compartment_
id str - (Updatable) The OCID of the owning compartment.
- Mapping[str, Any]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display_
name str - (Updatable) The display name of the view.
- Mapping[str, Any]
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- scope str
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- compartment
Id String - (Updatable) The OCID of the owning compartment.
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name String - (Updatable) The display name of the view.
- Map<Any>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- scope String
If specified, must be
PRIVATE
when creating a view for private zones.** 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
Outputs
All input properties are implicitly available as output properties. Additionally, the View resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- id string
- The provider-assigned unique ID for this managed resource.
- is
Protected boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self string
- The canonical absolute URL of the resource.
- state string
- The current state of the resource.
- time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self str
- The canonical absolute URL of the resource.
- state str
- The current state of the resource.
- time_
created str - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time_
updated str - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- id String
- The provider-assigned unique ID for this managed resource.
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
Look up Existing View Resource
Get an existing View 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?: ViewState, opts?: CustomResourceOptions): View
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
compartment_id: Optional[str] = None,
defined_tags: Optional[Mapping[str, Any]] = None,
display_name: Optional[str] = None,
freeform_tags: Optional[Mapping[str, Any]] = None,
is_protected: Optional[bool] = None,
scope: Optional[str] = None,
self: Optional[str] = None,
state: Optional[str] = None,
time_created: Optional[str] = None,
time_updated: Optional[str] = None) -> View
func GetView(ctx *Context, name string, id IDInput, state *ViewState, opts ...ResourceOption) (*View, error)
public static View Get(string name, Input<string> id, ViewState? state, CustomResourceOptions? opts = null)
public static View get(String name, Output<String> id, ViewState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Compartment
Id string - (Updatable) The OCID of the owning compartment.
- Dictionary<string, object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- Display
Name string - (Updatable) The display name of the view.
- Dictionary<string, object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Compartment
Id string - (Updatable) The OCID of the owning compartment.
- map[string]interface{}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- Display
Name string - (Updatable) The display name of the view.
- map[string]interface{}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- Is
Protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- Scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- Self string
- The canonical absolute URL of the resource.
- State string
- The current state of the resource.
- Time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- Time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id String - (Updatable) The OCID of the owning compartment.
- Map<String,Object>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name String - (Updatable) The display name of the view.
- Map<String,Object>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- scope String
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id string - (Updatable) The OCID of the owning compartment.
- {[key: string]: any}
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name string - (Updatable) The display name of the view.
- {[key: string]: any}
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- is
Protected boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- scope string
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- self string
- The canonical absolute URL of the resource.
- state string
- The current state of the resource.
- time
Created string - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated string - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment_
id str - (Updatable) The OCID of the owning compartment.
- Mapping[str, Any]
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display_
name str - (Updatable) The display name of the view.
- Mapping[str, Any]
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- is_
protected bool - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- scope str
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- self str
- The canonical absolute URL of the resource.
- state str
- The current state of the resource.
- time_
created str - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time_
updated str - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- compartment
Id String - (Updatable) The OCID of the owning compartment.
- Map<Any>
(Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example:
{"Operations": {"CostCenter": "42"}}
- display
Name String - (Updatable) The display name of the view.
- Map<Any>
(Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example:
{"Department": "Finance"}
- is
Protected Boolean - A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.
- scope String
If specified, must be
PRIVATE
when creating a view for private zones.** 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
- self String
- The canonical absolute URL of the resource.
- state String
- The current state of the resource.
- time
Created String - The date and time the resource was created in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
- time
Updated String - The date and time the resource was last updated in "YYYY-MM-ddThh:mm:ssZ" format with a Z offset, as defined by RFC 3339.
Import
Views can be imported using their OCID, e.g.
$ pulumi import oci:Dns/view:View test_view "id"
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.