Oracle Cloud Infrastructure

Pulumi Official
Package maintained by Pulumi
v0.1.1 published on Tuesday, May 3, 2022 by Pulumi

getManagementAgentCount

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

using Pulumi;
using Oci = Pulumi.Oci;

class MyStack : Stack
{
    public MyStack()
    {
        var testManagementAgentCount = Output.Create(Oci.ManagementAgent.GetManagementAgentCount.InvokeAsync(new Oci.ManagementAgent.GetManagementAgentCountArgs
        {
            CompartmentId = @var.Compartment_id,
            GroupBies = @var.Management_agent_count_group_by,
            HasPlugins = @var.Management_agent_count_has_plugins,
            InstallType = @var.Management_agent_count_install_type,
        }));
    }

}
package main

import (
	"github.com/pulumi/pulumi-oci/sdk/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: _var.Compartment_id,
			GroupBies:     _var.Management_agent_count_group_by,
			HasPlugins:    pulumi.BoolRef(_var.Management_agent_count_has_plugins),
			InstallType:   pulumi.StringRef(_var.Management_agent_count_install_type),
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_oci as oci

test_management_agent_count = oci.ManagementAgent.get_management_agent_count(compartment_id=var["compartment_id"],
    group_bies=var["management_agent_count_group_by"],
    has_plugins=var["management_agent_count_has_plugins"],
    install_type=var["management_agent_count_install_type"])
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";

const testManagementAgentCount = oci.ManagementAgent.getManagementAgentCount({
    compartmentId: _var.compartment_id,
    groupBies: _var.management_agent_count_group_by,
    hasPlugins: _var.management_agent_count_has_plugins,
    installType: _var.management_agent_count_install_type,
});

Coming soon!

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:

CompartmentId string

The OCID of the compartment to which a request will be scoped.

GroupBies List<string>

The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.

HasPlugins 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.

InstallType 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.

CompartmentId string

The OCID of the compartment to which a request will be scoped.

GroupBies []string

The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.

HasPlugins 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.

InstallType 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.

compartmentId String

The OCID of the compartment to which a request will be scoped.

groupBies List<String>

The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.

hasPlugins 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.

installType 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.

compartmentId string

The OCID of the compartment to which a request will be scoped.

groupBies string[]

The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.

hasPlugins 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.

installType 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.

compartmentId String

The OCID of the compartment to which a request will be scoped.

groupBies List<String>

The field by which to group Management Agents. Currently, only one groupBy dimension is supported at a time.

hasPlugins 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.

installType 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:

CompartmentId string
GroupBies List<string>
Id string

The provider-assigned unique ID for this managed resource.

Items List<GetManagementAgentCountItem>

List in which each item describes an aggregation of Managment Agents

HasPlugins bool

Whether or not a managementAgent has at least one plugin

InstallType string

The install type, either AGENT or GATEWAY

CompartmentId string
GroupBies []string
Id string

The provider-assigned unique ID for this managed resource.

Items []GetManagementAgentCountItem

List in which each item describes an aggregation of Managment Agents

HasPlugins bool

Whether or not a managementAgent has at least one plugin

InstallType string

The install type, either AGENT or GATEWAY

compartmentId String
groupBies List<String>
id String

The provider-assigned unique ID for this managed resource.

items List<GetCountItem>

List in which each item describes an aggregation of Managment Agents

hasPlugins Boolean

Whether or not a managementAgent has at least one plugin

installType String

The install type, either AGENT or GATEWAY

compartmentId string
groupBies string[]
id string

The provider-assigned unique ID for this managed resource.

items GetManagementAgentCountItem[]

List in which each item describes an aggregation of Managment Agents

hasPlugins boolean

Whether or not a managementAgent has at least one plugin

installType 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 GetManagementAgentCountItem]

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

compartmentId String
groupBies 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

hasPlugins Boolean

Whether or not a managementAgent has at least one plugin

installType String

The install type, either AGENT or GATEWAY

Supporting Types

GetManagementAgentCountItem

Count int

The number of Management Agents in this group

Dimensions List<GetManagementAgentCountItemDimension>

The Aggregation of Management Agent Dimensions

Count int

The number of Management Agents in this group

Dimensions []GetManagementAgentCountItemDimension

The Aggregation of Management Agent Dimensions

count Integer

The number of Management Agents in this group

dimensions List<GetCountItemDimension>

The Aggregation of Management Agent Dimensions

count number

The number of Management Agents in this group

dimensions GetManagementAgentCountItemDimension[]

The Aggregation of Management Agent Dimensions

count int

The number of Management Agents in this group

dimensions GetManagementAgentCountItemDimension]

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

AvailabilityStatus string

The availability status of managementAgent

HasPlugins 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.

InstallType 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.

PlatformType string

Platform Type

Version string

Agent image version

AvailabilityStatus string

The availability status of managementAgent

HasPlugins 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.

InstallType 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.

PlatformType string

Platform Type

Version string

Agent image version

availabilityStatus String

The availability status of managementAgent

hasPlugins 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.

installType 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.

platformType String

Platform Type

version String

Agent image version

availabilityStatus string

The availability status of managementAgent

hasPlugins 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.

installType 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.

platformType 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

availabilityStatus String

The availability status of managementAgent

hasPlugins 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.

installType 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.

platformType String

Platform Type

version String

Agent image version

Package Details

Repository
https://github.com/pulumi/pulumi-oci
License
Apache-2.0
Notes

This Pulumi package is based on the oci Terraform Provider.