Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.Identity.getDynamicGroups
Explore with Pulumi AI
This data source provides the list of Dynamic Groups in Oracle Cloud Infrastructure Identity service.
Lists the dynamic groups in your tenancy. You must specify your tenancy’s OCID as the value for the compartment ID (remember that the tenancy is simply the root compartment). See Where to Get the Tenancy’s OCID and User’s OCID.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testDynamicGroups = oci.Identity.getDynamicGroups({
compartmentId: tenancyOcid,
name: dynamicGroupName,
state: dynamicGroupState,
});
import pulumi
import pulumi_oci as oci
test_dynamic_groups = oci.Identity.get_dynamic_groups(compartment_id=tenancy_ocid,
name=dynamic_group_name,
state=dynamic_group_state)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := Identity.GetDynamicGroups(ctx, &identity.GetDynamicGroupsArgs{
CompartmentId: tenancyOcid,
Name: pulumi.StringRef(dynamicGroupName),
State: pulumi.StringRef(dynamicGroupState),
}, 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 testDynamicGroups = Oci.Identity.GetDynamicGroups.Invoke(new()
{
CompartmentId = tenancyOcid,
Name = dynamicGroupName,
State = dynamicGroupState,
});
});
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.GetDynamicGroupsArgs;
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 testDynamicGroups = IdentityFunctions.getDynamicGroups(GetDynamicGroupsArgs.builder()
.compartmentId(tenancyOcid)
.name(dynamicGroupName)
.state(dynamicGroupState)
.build());
}
}
variables:
testDynamicGroups:
fn::invoke:
Function: oci:Identity:getDynamicGroups
Arguments:
compartmentId: ${tenancyOcid}
name: ${dynamicGroupName}
state: ${dynamicGroupState}
Using getDynamicGroups
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 getDynamicGroups(args: GetDynamicGroupsArgs, opts?: InvokeOptions): Promise<GetDynamicGroupsResult>
function getDynamicGroupsOutput(args: GetDynamicGroupsOutputArgs, opts?: InvokeOptions): Output<GetDynamicGroupsResult>
def get_dynamic_groups(compartment_id: Optional[str] = None,
filters: Optional[Sequence[_identity.GetDynamicGroupsFilter]] = None,
name: Optional[str] = None,
state: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDynamicGroupsResult
def get_dynamic_groups_output(compartment_id: Optional[pulumi.Input[str]] = None,
filters: Optional[pulumi.Input[Sequence[pulumi.Input[_identity.GetDynamicGroupsFilterArgs]]]] = None,
name: Optional[pulumi.Input[str]] = None,
state: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDynamicGroupsResult]
func GetDynamicGroups(ctx *Context, args *GetDynamicGroupsArgs, opts ...InvokeOption) (*GetDynamicGroupsResult, error)
func GetDynamicGroupsOutput(ctx *Context, args *GetDynamicGroupsOutputArgs, opts ...InvokeOption) GetDynamicGroupsResultOutput
> Note: This function is named GetDynamicGroups
in the Go SDK.
public static class GetDynamicGroups
{
public static Task<GetDynamicGroupsResult> InvokeAsync(GetDynamicGroupsArgs args, InvokeOptions? opts = null)
public static Output<GetDynamicGroupsResult> Invoke(GetDynamicGroupsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDynamicGroupsResult> getDynamicGroups(GetDynamicGroupsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:Identity/getDynamicGroups:getDynamicGroups
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
Dynamic Groups Filter> - Name string
- A filter to only return resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Filters
[]Get
Dynamic Groups Filter - Name string
- A filter to only return resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
List<Get
Dynamic Groups Filter> - name String
- A filter to only return resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Get
Dynamic Groups Filter[] - name string
- A filter to only return resources that match the given name exactly.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartment_
id str - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters
Sequence[identity.
Get Dynamic Groups Filter] - name str
- A filter to only return resources that match the given name exactly.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- filters List<Property Map>
- name String
- A filter to only return resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
getDynamicGroups Result
The following output properties are available:
- Compartment
Id string - The OCID of the tenancy containing the group.
- Dynamic
Groups List<GetDynamic Groups Dynamic Group> - The list of dynamic_groups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
List<Get
Dynamic Groups Filter> - Name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- State string
- The group's current state.
- Compartment
Id string - The OCID of the tenancy containing the group.
- Dynamic
Groups []GetDynamic Groups Dynamic Group - The list of dynamic_groups.
- Id string
- The provider-assigned unique ID for this managed resource.
- Filters
[]Get
Dynamic Groups Filter - Name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- State string
- The group's current state.
- compartment
Id String - The OCID of the tenancy containing the group.
- dynamic
Groups List<GetDynamic Groups Dynamic Group> - The list of dynamic_groups.
- id String
- The provider-assigned unique ID for this managed resource.
- filters
List<Get
Dynamic Groups Filter> - name String
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state String
- The group's current state.
- compartment
Id string - The OCID of the tenancy containing the group.
- dynamic
Groups GetDynamic Groups Dynamic Group[] - The list of dynamic_groups.
- id string
- The provider-assigned unique ID for this managed resource.
- filters
Get
Dynamic Groups Filter[] - name string
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state string
- The group's current state.
- compartment_
id str - The OCID of the tenancy containing the group.
- dynamic_
groups Sequence[identity.Get Dynamic Groups Dynamic Group] - The list of dynamic_groups.
- id str
- The provider-assigned unique ID for this managed resource.
- filters
Sequence[identity.
Get Dynamic Groups Filter] - name str
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state str
- The group's current state.
- compartment
Id String - The OCID of the tenancy containing the group.
- dynamic
Groups List<Property Map> - The list of dynamic_groups.
- id String
- The provider-assigned unique ID for this managed resource.
- filters List<Property Map>
- name String
- The name you assign to the group during creation. The name must be unique across all groups in the tenancy and cannot be changed.
- state String
- The group's current state.
Supporting Types
GetDynamicGroupsDynamicGroup
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Dictionary<string, string>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Dictionary<string, string>
- 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"}
- Id string
- The OCID of the group.
- Inactive
State string - The detailed status of INACTIVE lifecycleState.
- Matching
Rule string - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- Name string
- A filter to only return resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- Compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- map[string]string
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- Description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- map[string]string
- 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"}
- Id string
- The OCID of the group.
- Inactive
State string - The detailed status of INACTIVE lifecycleState.
- Matching
Rule string - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- Name string
- A filter to only return resources that match the given name exactly.
- State string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- Time
Created string - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Map<String,String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Map<String,String>
- 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"}
- id String
- The OCID of the group.
- inactive
State String - The detailed status of INACTIVE lifecycleState.
- matching
Rule String - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- name String
- A filter to only return resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id string - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- {[key: string]: string}
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description string
- The description you assign to the group. Does not have to be unique, and it's changeable.
- {[key: string]: string}
- 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"}
- id string
- The OCID of the group.
- inactive
State string - The detailed status of INACTIVE lifecycleState.
- matching
Rule string - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- name string
- A filter to only return resources that match the given name exactly.
- state string
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created string - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- compartment_
id str - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Mapping[str, str]
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description str
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Mapping[str, str]
- 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"}
- id str
- The OCID of the group.
- inactive_
state str - The detailed status of INACTIVE lifecycleState.
- matching_
rule str - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- name str
- A filter to only return resources that match the given name exactly.
- state str
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time_
created str - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
- compartment
Id String - The OCID of the compartment (remember that the tenancy is simply the root compartment).
- Map<String>
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:
{"Operations.CostCenter": "42"}
- description String
- The description you assign to the group. Does not have to be unique, and it's changeable.
- Map<String>
- 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"}
- id String
- The OCID of the group.
- inactive
State String - The detailed status of INACTIVE lifecycleState.
- matching
Rule String - A rule string that defines which instance certificates will be matched. For syntax, see Managing Dynamic Groups.
- name String
- A filter to only return resources that match the given name exactly.
- state String
- A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
- time
Created String - Date and time the group was created, in the format defined by RFC3339. Example:
2016-08-25T21:10:29.600Z
GetDynamicGroupsFilter
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.