Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi
oci.ManagementAgent.getManagementAgentCount
Explore with Pulumi AI
This data source provides details about a specific Management Agent Count resource in Oracle Cloud Infrastructure Management Agent service.
Gets count of the inventory of agents for a given compartment id, group by, and isPluginDeployed parameters. Supported groupBy parameters: availabilityStatus, platformType, version
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testManagementAgentCount = oci.ManagementAgent.getManagementAgentCount({
compartmentId: compartmentId,
groupBies: managementAgentCountGroupBy,
hasPlugins: managementAgentCountHasPlugins,
installType: managementAgentCountInstallType,
});
import pulumi
import pulumi_oci as oci
test_management_agent_count = oci.ManagementAgent.get_management_agent_count(compartment_id=compartment_id,
group_bies=management_agent_count_group_by,
has_plugins=management_agent_count_has_plugins,
install_type=management_agent_count_install_type)
package main
import (
"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/ManagementAgent"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ManagementAgent.GetManagementAgentCount(ctx, &managementagent.GetManagementAgentCountArgs{
CompartmentId: compartmentId,
GroupBies: managementAgentCountGroupBy,
HasPlugins: pulumi.BoolRef(managementAgentCountHasPlugins),
InstallType: pulumi.StringRef(managementAgentCountInstallType),
}, 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 testManagementAgentCount = Oci.ManagementAgent.GetManagementAgentCount.Invoke(new()
{
CompartmentId = compartmentId,
GroupBies = managementAgentCountGroupBy,
HasPlugins = managementAgentCountHasPlugins,
InstallType = managementAgentCountInstallType,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.ManagementAgent.ManagementAgentFunctions;
import com.pulumi.oci.ManagementAgent.inputs.GetManagementAgentCountArgs;
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 testManagementAgentCount = ManagementAgentFunctions.getManagementAgentCount(GetManagementAgentCountArgs.builder()
.compartmentId(compartmentId)
.groupBies(managementAgentCountGroupBy)
.hasPlugins(managementAgentCountHasPlugins)
.installType(managementAgentCountInstallType)
.build());
}
}
variables:
testManagementAgentCount:
fn::invoke:
Function: oci:ManagementAgent:getManagementAgentCount
Arguments:
compartmentId: ${compartmentId}
groupBies: ${managementAgentCountGroupBy}
hasPlugins: ${managementAgentCountHasPlugins}
installType: ${managementAgentCountInstallType}
Using getManagementAgentCount
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 getManagementAgentCount(args: GetManagementAgentCountArgs, opts?: InvokeOptions): Promise<GetManagementAgentCountResult>
function getManagementAgentCountOutput(args: GetManagementAgentCountOutputArgs, opts?: InvokeOptions): Output<GetManagementAgentCountResult>
def get_management_agent_count(compartment_id: Optional[str] = None,
group_bies: Optional[Sequence[str]] = None,
has_plugins: Optional[bool] = None,
install_type: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetManagementAgentCountResult
def get_management_agent_count_output(compartment_id: Optional[pulumi.Input[str]] = None,
group_bies: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
has_plugins: Optional[pulumi.Input[bool]] = None,
install_type: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetManagementAgentCountResult]
func GetManagementAgentCount(ctx *Context, args *GetManagementAgentCountArgs, opts ...InvokeOption) (*GetManagementAgentCountResult, error)
func GetManagementAgentCountOutput(ctx *Context, args *GetManagementAgentCountOutputArgs, opts ...InvokeOption) GetManagementAgentCountResultOutput
> Note: This function is named GetManagementAgentCount
in the Go SDK.
public static class GetManagementAgentCount
{
public static Task<GetManagementAgentCountResult> InvokeAsync(GetManagementAgentCountArgs args, InvokeOptions? opts = null)
public static Output<GetManagementAgentCountResult> Invoke(GetManagementAgentCountInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetManagementAgentCountResult> getManagementAgentCount(GetManagementAgentCountArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: oci:ManagementAgent/getManagementAgentCount:getManagementAgentCount
arguments:
# arguments dictionary
The following arguments are supported:
- Compartment
Id string - The OCID of the compartment to which a request will be scoped.
- Group
Bies List<string> - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- Has
Plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- Install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- Compartment
Id string - The OCID of the compartment to which a request will be scoped.
- Group
Bies []string - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- Has
Plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- Install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- compartment
Id String - The OCID of the compartment to which a request will be scoped.
- group
Bies List<String> - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- has
Plugins Boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type String - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- compartment
Id string - The OCID of the compartment to which a request will be scoped.
- group
Bies string[] - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- has
Plugins boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- compartment_
id str - The OCID of the compartment to which a request will be scoped.
- group_
bies Sequence[str] - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- has_
plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install_
type str - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- compartment
Id String - The OCID of the compartment to which a request will be scoped.
- group
Bies List<String> - The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.
- has
Plugins Boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type String - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
getManagementAgentCount Result
The following output properties are available:
- Compartment
Id string - Group
Bies List<string> - Id string
- The provider-assigned unique ID for this managed resource.
- Items
List<Get
Management Agent Count Item> - List in which each item describes an aggregation of Managment Agents
- Has
Plugins bool - Whether or not a managementAgent has at least one plugin
- Install
Type string - The install type, either AGENT or GATEWAY
- Compartment
Id string - Group
Bies []string - Id string
- The provider-assigned unique ID for this managed resource.
- Items
[]Get
Management Agent Count Item - List in which each item describes an aggregation of Managment Agents
- Has
Plugins bool - Whether or not a managementAgent has at least one plugin
- Install
Type string - The install type, either AGENT or GATEWAY
- compartment
Id String - group
Bies List<String> - id String
- The provider-assigned unique ID for this managed resource.
- items
List<Get
Count Item> - List in which each item describes an aggregation of Managment Agents
- has
Plugins Boolean - Whether or not a managementAgent has at least one plugin
- install
Type String - The install type, either AGENT or GATEWAY
- compartment
Id string - group
Bies string[] - id string
- The provider-assigned unique ID for this managed resource.
- items
Get
Management Agent Count Item[] - List in which each item describes an aggregation of Managment Agents
- has
Plugins boolean - Whether or not a managementAgent has at least one plugin
- install
Type string - The install type, either AGENT or GATEWAY
- compartment_
id str - group_
bies Sequence[str] - id str
- The provider-assigned unique ID for this managed resource.
- items
Sequence[managementagent.
Get Management Agent Count Item] - List in which each item describes an aggregation of Managment Agents
- has_
plugins bool - Whether or not a managementAgent has at least one plugin
- install_
type str - The install type, either AGENT or GATEWAY
- compartment
Id String - group
Bies List<String> - id String
- The provider-assigned unique ID for this managed resource.
- items List<Property Map>
- List in which each item describes an aggregation of Managment Agents
- has
Plugins Boolean - Whether or not a managementAgent has at least one plugin
- install
Type String - The install type, either AGENT or GATEWAY
Supporting Types
GetManagementAgentCountItem
- Count int
- The number of Management Agents in this group
- Dimensions
List<Get
Management Agent Count Item Dimension> - The Aggregation of Management Agent Dimensions
- Count int
- The number of Management Agents in this group
- Dimensions
[]Get
Management Agent Count Item Dimension - The Aggregation of Management Agent Dimensions
- count Integer
- The number of Management Agents in this group
- dimensions
List<Get
Count Item Dimension> - The Aggregation of Management Agent Dimensions
- count number
- The number of Management Agents in this group
- dimensions
Get
Management Agent Count Item Dimension[] - The Aggregation of Management Agent Dimensions
- count int
- The number of Management Agents in this group
- dimensions
Sequence[managementagent.
Get Management Agent Count Item Dimension] - The Aggregation of Management Agent Dimensions
- count Number
- The number of Management Agents in this group
- dimensions List<Property Map>
- The Aggregation of Management Agent Dimensions
GetManagementAgentCountItemDimension
- Availability
Status string - The availability status of managementAgent
- Has
Plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- Install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- Platform
Type string - Platform Type
- Version string
- Agent image version
- Availability
Status string - The availability status of managementAgent
- Has
Plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- Install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- Platform
Type string - Platform Type
- Version string
- Agent image version
- availability
Status String - The availability status of managementAgent
- has
Plugins Boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type String - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- platform
Type String - Platform Type
- version String
- Agent image version
- availability
Status string - The availability status of managementAgent
- has
Plugins boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type string - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- platform
Type string - Platform Type
- version string
- Agent image version
- availability_
status str - The availability status of managementAgent
- has_
plugins bool - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install_
type str - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- platform_
type str - Platform Type
- version str
- Agent image version
- availability
Status String - The availability status of managementAgent
- has
Plugins Boolean - When set to true then agents that have at least one plugin deployed will be returned. When set to false only agents that have no plugins deployed will be returned.
- install
Type String - A filter to return either agents or gateway types depending upon install type selected by user. By default both install type will be returned.
- platform
Type String - Platform Type
- version String
- Agent image version
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
oci
Terraform Provider.