1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. ManagementAgent
  5. getManagementAgentCount
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

oci.ManagementAgent.getManagementAgentCount

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi

    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:

    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 Sequence[managementagent.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 Sequence[managementagent.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
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.17.0 published on Friday, Nov 15, 2024 by Pulumi