Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
oci.Identity.getTagDefaults
Explore with Pulumi AI
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi
This data source provides the list of Tag Defaults in Oracle Cloud Infrastructure Identity service.
Lists the tag defaults for tag definitions in the specified compartment.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testTagDefaults = oci.Identity.getTagDefaults({
compartmentId: compartmentId,
id: tagDefaultId,
state: tagDefaultState,
tagDefinitionId: testTagDefinition.id,
});
import pulumi
import pulumi_oci as oci
test_tag_defaults = oci.Identity.get_tag_defaults(compartment_id=compartment_id,
id=tag_default_id,
state=tag_default_state,
tag_definition_id=test_tag_definition["id"])
package main
import (
"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Identity.GetTagDefaults(ctx, &identity.GetTagDefaultsArgs{
CompartmentId: pulumi.StringRef(compartmentId),
Id: pulumi.StringRef(tagDefaultId),
State: pulumi.StringRef(tagDefaultState),
TagDefinitionId: pulumi.StringRef(testTagDefinition.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 testTagDefaults = Oci.Identity.GetTagDefaults.Invoke(new()
{
CompartmentId = compartmentId,
Id = tagDefaultId,
State = tagDefaultState,
TagDefinitionId = testTagDefinition.Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.Identity.IdentityFunctions;
import com.pulumi.oci.Identity.inputs.GetTagDefaultsArgs;
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 testTagDefaults = IdentityFunctions.getTagDefaults(GetTagDefaultsArgs.builder()
.compartmentId(compartmentId)
.id(tagDefaultId)
.state(tagDefaultState)
.tagDefinitionId(testTagDefinition.id())
.build());
}
}
variables:
testTagDefaults:
fn::invoke:
Function: oci:Identity:getTagDefaults
Arguments:
compartmentId: ${compartmentId}
id: ${tagDefaultId}
state: ${tagDefaultState}
tagDefinitionId: ${testTagDefinition.id}
Using getTagDefaults
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 getTagDefaults(args: GetTagDefaultsArgs, opts?: InvokeOptions): Promise<GetTagDefaultsResult>
function getTagDefaultsOutput(args: GetTagDefaultsOutputArgs, opts?: InvokeOptions): Output<GetTagDefaultsResult>
def get_tag_defaults(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_identity.GetTagDefaultsFilter]] = None,
id: Optional[str] = None,
state: Optional[str] = None,
tag_definition_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTagDefaultsResult
def get_tag_defaults_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetTagDefaultsFilterArgs]]]] = None,
id: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
tag_definition_id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTagDefaultsResult]
func GetTagDefaults(ctx *Context, args *GetTagDefaultsArgs, opts ...InvokeOption) (*GetTagDefaultsResult, error)
func GetTagDefaultsOutput(ctx *Context, args *GetTagDefaultsOutputArgs, opts ...InvokeOption) GetTagDefaultsResultOutput
> Note: This function is named GetTagDefaults
in the Go SDK.
public static class GetTagDefaults
{
public static Task<GetTagDefaultsResult> InvokeAsync(GetTagDefaultsArgs args, InvokeOptions? opts = null)
public static Output<GetTagDefaultsResult> Invoke(GetTagDefaultsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetTagDefaultsResult> getTagDefaults(GetTagDefaultsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Identity/getTagDefaults:getTagDefaults
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Filters
List<Get
Tag Defaults Filter> - Id string
- A filter to only return resources that match the specified OCID exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Tag
Definition stringId - The OCID of the tag definition.
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Filters
[]Get
Tag Defaults Filter - Id string
- A filter to only return resources that match the specified OCID exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Tag
Definition stringId - The OCID of the tag definition.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
List<Get
Tag Defaults Filter> - id String
- A filter to only return resources that match the specified OCID exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition StringId - The OCID of the tag definition.
- compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Get
Tag Defaults Filter[] - id string
- A filter to only return resources that match the specified OCID exactly.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition stringId - The OCID of the tag definition.
- compartment_
id str - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Sequence[identity.
Get Tag Defaults Filter] - id str
- A filter to only return resources that match the specified OCID exactly.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag_
definition_ strid - The OCID of the tag definition.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters List<Property Map>
- id String
- A filter to only return resources that match the specified OCID exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition StringId - The OCID of the tag definition.
getTagDefaults Result
The following output properties are available:
- Tag
Defaults List<GetTag Defaults Tag Default> - The list of tag_defaults.
- Compartment
Id string - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- Filters
List<Get
Tag Defaults Filter> - Id string
- The OCID of the tag default.
- State string
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - Tag
Definition stringId - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
- Tag
Defaults []GetTag Defaults Tag Default - The list of tag_defaults.
- Compartment
Id string - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- Filters
[]Get
Tag Defaults Filter - Id string
- The OCID of the tag default.
- State string
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - Tag
Definition stringId - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
- tag
Defaults List<GetTag Defaults Tag Default> - The list of tag_defaults.
- compartment
Id String - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- filters
List<Get
Tag Defaults Filter> - id String
- The OCID of the tag default.
- state String
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - tag
Definition StringId - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
- tag
Defaults GetTag Defaults Tag Default[] - The list of tag_defaults.
- compartment
Id string - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- filters
Get
Tag Defaults Filter[] - id string
- The OCID of the tag default.
- state string
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - tag
Definition stringId - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
- tag_
defaults Sequence[identity.Get Tag Defaults Tag Default] - The list of tag_defaults.
- compartment_
id str - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- filters
Sequence[identity.
Get Tag Defaults Filter] - id str
- The OCID of the tag default.
- state str
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - tag_
definition_ strid - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
- tag
Defaults List<Property Map> - The list of tag_defaults.
- compartment
Id String - The OCID of the compartment. The tag default applies to all new resources that get created in the compartment. Resources that existed before the tag default was created are not tagged.
- filters List<Property Map>
- id String
- The OCID of the tag default.
- state String
- The tag default's current state. After creating a
TagDefault
, make sure itslifecycleState
is ACTIVE before using it. - tag
Definition StringId - The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
Supporting Types
GetTagDefaultsFilter
GetTagDefaultsTagDefault
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Id string
- A filter to only return resources that match the specified OCID exactly.
- Is
Required bool - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Tag
Definition stringId - The OCID of the tag definition.
- Tag
Definition stringName - The name used in the tag definition. This field is informational in the context of the tag default.
- Tag
Namespace stringId - The OCID of the tag namespace that contains the tag definition.
- Time
Created string - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Value string
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Id string
- A filter to only return resources that match the specified OCID exactly.
- Is
Required bool - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Tag
Definition stringId - The OCID of the tag definition.
- Tag
Definition stringName - The name used in the tag definition. This field is informational in the context of the tag default.
- Tag
Namespace stringId - The OCID of the tag namespace that contains the tag definition.
- Time
Created string - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- Value string
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- id String
- A filter to only return resources that match the specified OCID exactly.
- is
Required Boolean - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition StringId - The OCID of the tag definition.
- tag
Definition StringName - The name used in the tag definition. This field is informational in the context of the tag default.
- tag
Namespace StringId - The OCID of the tag namespace that contains the tag definition.
- time
Created String - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- value String
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
- compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- id string
- A filter to only return resources that match the specified OCID exactly.
- is
Required boolean - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition stringId - The OCID of the tag definition.
- tag
Definition stringName - The name used in the tag definition. This field is informational in the context of the tag default.
- tag
Namespace stringId - The OCID of the tag namespace that contains the tag definition.
- time
Created string - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- value string
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
- compartment_
id str - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- id str
- A filter to only return resources that match the specified OCID exactly.
- is_
required bool - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag_
definition_ strid - The OCID of the tag definition.
- tag_
definition_ strname - The name used in the tag definition. This field is informational in the context of the tag default.
- tag_
namespace_ strid - The OCID of the tag namespace that contains the tag definition.
- time_
created str - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- value str
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- id String
- A filter to only return resources that match the specified OCID exactly.
- is
Required Boolean - If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.
- If the
isRequired
flag is set to "true", the value is set during resource creation. - If the
isRequired
flag is set to "false", the value you enter is set during resource creation.
- If the
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- tag
Definition StringId - The OCID of the tag definition.
- tag
Definition StringName - The name used in the tag definition. This field is informational in the context of the tag default.
- tag
Namespace StringId - The OCID of the tag namespace that contains the tag definition.
- time
Created String - Date and time the
TagDefault
object was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
- value String
- The default value for the tag definition. This will be applied to all new resources created in the compartment.
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi