ResourceGroup

A ResourceGroup is a group of resources from various providers.

Package : spaceone.api.inventory.v1

ResourceGroup

ResourceGroup Methods:

create

Creates a new ResourceGroup. You can integrate resources from different providers by specifying the cloud resources to be grouped in the resources parameter.

POST /inventory/v1/resource-group/create

{{< tabs " create " >}}

{{< tab "Request Example" >}}

CreateResourceGroupRequest

  • name (string) Required

  • resources (Resource) Repeated Required

  • project_id (string) Required

  • domain_id (string) Required

  • options (Struct)

  • tags (Struct)

{{< highlight json >}} { "name": "azure-group-1", "resources": [ { "resource_type": "inventory.Server?provider=azure&cloud_service_group=Compute&cloud_service_type=VirtualMachine", "filter": [ {"o": "eq", "k": "provider", "v": "azure"}, {"o": "eq", "k": "cloud_service_group", "v": "Compute"}, {"o": "eq", "k": "cloud_service_type", "v": "VirtualMachine"} ] } ], "options": { "raw_filter": [] }, "tags": { "a": "b" } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ResourceGroupInfo

  • resource_group_id (string) Required

  • name (string) Required

  • resources (Resource) Repeated Required

  • options (Struct) Required

  • tags (Struct) Required

  • project_id (string) Required

  • domain_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "resource_group_id": "rsc-grp-7d46a1fc7738", "name": "azure-group-1", "resources": [ { "resource_type": "inventory.Server?provider=azure&cloud_service_group=Compute&cloud_service_type=VirtualMachine", "filter": [ { "k": "provider", "v": "azure", "o": "eq" }, { "k": "cloud_service_group", "v": "Compute", "o": "eq" }, { "k": "cloud_service_type", "v": "VirtualMachine", "o": "eq" } ] } ], "options": { "raw_filter": [] }, "tags": { "a": "b" }, "domain_id": "domain-58010aa2e451", "created_at": "2022-06-23T01:50:33.152Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

update

Updates a specific ResourceGroup. You can make changes in ResourceGroup settings, including name, tags, and grouped resources in the ResourceGroup.

POST /inventory/v1/resource-group/update

{{< tabs " update " >}}

{{< tab "Request Example" >}}

UpdateResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

  • name (string)

  • resources (Resource) Repeated

  • options (Struct)

  • tags (Struct)

  • release_project (bool)

  • project_id (string)

{{< highlight json >}} { "resource_group_id": "rsc-grp-7d46a1fc7738", "name": "azure-grp-test2", "resources": [ { "resource_type": "inventory.Server?provider=azure&cloud_service_group=Compute&cloud_service_type=VirtualMachine", "filter": [ {"k": "provider", "v": "azure", "o": "eq"}, {"o": "eq", "k": "cloud_service_group", "v": "Compute"}, {"v": "VirtualMachine", "k": "cloud_service_type", "o": "eq"} ] } ], "options": {}, "tags": { "b": "c" } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ResourceGroupInfo

  • resource_group_id (string) Required

  • name (string) Required

  • resources (Resource) Repeated Required

  • options (Struct) Required

  • tags (Struct) Required

  • project_id (string) Required

  • domain_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "resource_group_id": "rsc-grp-7d46a1fc7738", "name": "azure-group-1", "resources": [ { "resource_type": "inventory.Server?provider=azure&cloud_service_group=Compute&cloud_service_type=VirtualMachine", "filter": [ { "k": "provider", "v": "azure", "o": "eq" }, { "k": "cloud_service_group", "v": "Compute", "o": "eq" }, { "k": "cloud_service_type", "v": "VirtualMachine", "o": "eq" } ] } ], "options": { "raw_filter": [] }, "tags": { "a": "b" }, "domain_id": "domain-58010aa2e451", "created_at": "2022-06-23T01:50:33.152Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

delete

Deletes a specific ResourceGroup. You must specify the resource_group_id of the ResourceGroup to delete.

POST /inventory/v1/resource-group/delete

{{< tabs " delete " >}}

{{< tab "Request Example" >}}

ResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

{{< highlight json >}} { "resource_group_id": "rsc-grp-aa3c4ca465b2" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

get

Gets a specific ResourceGroup. Prints detailed information about the ResourceGroup, including the information of the grouped cloud resources.

POST /inventory/v1/resource-group/get

{{< tabs " get " >}}

{{< tab "Request Example" >}}

GetResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

  • only (string) Repeated

{{< highlight json >}} { "resource_group_id": "rsc-grp-aa3c4ca465b2" } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ResourceGroupInfo

  • resource_group_id (string) Required

  • name (string) Required

  • resources (Resource) Repeated Required

  • options (Struct) Required

  • tags (Struct) Required

  • project_id (string) Required

  • domain_id (string) Required

  • created_at (string) Required

{{< highlight json >}} { "resource_group_id": "rsc-grp-7d46a1fc7738", "name": "azure-group-1", "resources": [ { "resource_type": "inventory.Server?provider=azure&cloud_service_group=Compute&cloud_service_type=VirtualMachine", "filter": [ { "k": "provider", "v": "azure", "o": "eq" }, { "k": "cloud_service_group", "v": "Compute", "o": "eq" }, { "k": "cloud_service_type", "v": "VirtualMachine", "o": "eq" } ] } ], "options": { "raw_filter": [] }, "tags": { "a": "b" }, "domain_id": "domain-58010aa2e451", "created_at": "2022-06-23T01:50:33.152Z" } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

list

Gets a list of all ResourceGroups. You can use a query to get a filtered list of ResourceGroups.

POST /inventory/v1/resource-group/list

{{< tabs " list " >}}

{{< tab "Request Example" >}}

ResourceGroupQuery

  • domain_id (string) Required

  • query (Query)

  • resource_group_id (string)

  • name (string)

  • project_id (string)

{{< highlight json >}} { "query": { "filter": [ { "key": "name", "value": [ "azure-vmss-group", "stset" ], "operator": "in" } ] } } {{< /highlight >}} {{< /tab >}}

{{< tab "Response Example" >}}

ResourceGroupsInfo

  • results (ResourceGroupInfo) Repeated Required

  • total_count (int32) Required

{{< highlight json >}} { "results": [ { "resource_group_id": "rsc-grp-4c86e071e0f0", "name": "azure-vmss-group", "resources": [ { "resource_type": "inventory.CloudService?provider=azure&cloud_service_group=Compute&cloud_service_type=VmScaleSet", "filter": [ { "k": "provider", "v": "azure", "o": "eq" }, { "v": "Compute", "k": "cloud_service_group", "o": "eq" }, { "k": "cloud_service_type", "v": "VmScaleSet", "o": "eq" } ] } ], "options": { "raw_filter": [] }, "tags": {}, "project_id": "project-9074eea97d7e", "domain_id": "domain-58010aa2e451", "created_at": "2021-04-23T03:23:40.037Z" }, { "resource_group_id": "rsc-grp-aa3c4ca465b2", "name": "stset", "resources": [ { "resource_type": "inventory.Server?provider=aws&cloud_service_group=EC2&cloud_service_type=Instance", "filter": [ { "k": "provider", "v": "aws", "o": "eq" }, { "v": "EC2", "k": "cloud_service_group", "o": "eq" }, { "k": "cloud_service_type", "v": "Instance", "o": "eq" } ], "keyword": "test" } ], "options": { "raw_filter": [ [ "test" ] ] }, "tags": {}, "project_id": "project-18655561c535", "domain_id": "domain-58010aa2e451", "created_at": "2021-06-01T10:23:20.537Z" } ], "total_count": 2 } {{< /highlight >}} {{< /tab >}}

{{< /tabs >}}

stat

POST /inventory/v1/resource-group/stat

Message

CreateResourceGroupRequest

  • name (string) Required

  • resources (Resource) Repeated Required

  • project_id (string) Required

  • domain_id (string) Required

  • options (Struct)

  • tags (Struct)

GetResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

  • only (string) Repeated

Resource

  • resource_type (string) Required

  • filter (ListValue)

  • keyword (string)

ResourceGroupInfo

  • resource_group_id (string) Required

  • name (string) Required

  • resources (Resource) Repeated Required

  • options (Struct) Required

  • tags (Struct) Required

  • project_id (string) Required

  • domain_id (string) Required

  • created_at (string) Required

ResourceGroupQuery

  • domain_id (string) Required

  • query (Query)

  • resource_group_id (string)

  • name (string)

  • project_id (string)

ResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

ResourceGroupStatQuery

  • query (StatisticsQuery) Required

  • domain_id (string) Required

ResourceGroupsInfo

  • results (ResourceGroupInfo) Repeated Required

  • total_count (int32) Required

UpdateResourceGroupRequest

  • resource_group_id (string) Required

  • domain_id (string) Required

  • name (string)

  • resources (Resource) Repeated

  • options (Struct)

  • tags (Struct)

  • release_project (bool)

  • project_id (string)

Last updated