CreateDynamicGroup

POST {{baseUrl}}/dynamicGroups/

Creates a new dynamic group in your tenancy.

You must specify your tenancy's OCID as the compartment ID in the request object (remember that the tenancy is simply the root compartment). Notice that IAM resources (users, groups, compartments, and some policies) reside within the tenancy itself, unlike cloud resources such as compute instances, which typically reside within compartments inside the tenancy. For information about OCIDs, see Resource Identifiers.

You must also specify a name for the dynamic group, which must be unique across all dynamic groups in your tenancy, and cannot be changed. Note that this name has to be also unique across all groups in your tenancy. You can use this name or the OCID when writing policies that apply to the dynamic group. For more information about policies, see How Policies Work.

You must also specify a description for the dynamic group (although it can be an empty string). It does not have to be unique, and you can change it anytime with UpdateDynamicGroup.

After you send your request, the new object's lifecycleState will temporarily be CREATING. Before using the object, first make sure its lifecycleState has changed to ACTIVE.

Request Body

{"name"=>"pariatur culpa laboris", "compartmentId"=>"{{compartment_ocid}}", "matchingRule"=>"ALL {instance.compartment.id = '{{compartment_ocid}}'}", "description"=>"amet elit"}

HEADERS

KeyDatatypeRequiredDescription
opc-retry-tokenstringA token that uniquely identifies a request so it can be retried in case of a timeout or
server error without risk of executing that same action again. Retry tokens expire after 24
hours, but can be invalidated before then due to conflicting operations (e.g., if a resource
has been deleted and purged from the system, then a retry of the original creation request
may be rejected).
Content-Typestring
Datestring(Required) Current Date
Authorizationstring(Required) Signature Authentication on Authorization header
x-content-sha256string(Required) Content sha256 for POST, PUT and PATCH operations

RESPONSES

status: OK

{"id":"dolore in exercitation","compartmentId":"quis dolor anim commodo tempor","name":"non ad minim culpa","description":"adipisicing voluptate occaecat","matchingRule":"proident ea","timeCreated":"1970-02-22T22:39:59.637Z","lifecycleState":"ACTIVE","definedTags":{},"freeformTags":{},"inactiveStatus":-25580892}