1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. DatabaseMigration
  5. getAgents
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

oci.DatabaseMigration.getAgents

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi

    This data source provides the list of Agents in Oracle Cloud Infrastructure Database Migration service.

    Display the name of all the existing ODMS Agents in the server.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testAgents = Oci.DatabaseMigration.GetAgents.Invoke(new()
        {
            CompartmentId = @var.Compartment_id,
            DisplayName = @var.Agent_display_name,
            State = @var.Agent_state,
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/DatabaseMigration"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := DatabaseMigration.GetAgents(ctx, &databasemigration.GetAgentsArgs{
    			CompartmentId: _var.Compartment_id,
    			DisplayName:   pulumi.StringRef(_var.Agent_display_name),
    			State:         pulumi.StringRef(_var.Agent_state),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.DatabaseMigration.DatabaseMigrationFunctions;
    import com.pulumi.oci.DatabaseMigration.inputs.GetAgentsArgs;
    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 testAgents = DatabaseMigrationFunctions.getAgents(GetAgentsArgs.builder()
                .compartmentId(var_.compartment_id())
                .displayName(var_.agent_display_name())
                .state(var_.agent_state())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_oci as oci
    
    test_agents = oci.DatabaseMigration.get_agents(compartment_id=var["compartment_id"],
        display_name=var["agent_display_name"],
        state=var["agent_state"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testAgents = oci.DatabaseMigration.getAgents({
        compartmentId: _var.compartment_id,
        displayName: _var.agent_display_name,
        state: _var.agent_state,
    });
    
    variables:
      testAgents:
        fn::invoke:
          Function: oci:DatabaseMigration:getAgents
          Arguments:
            compartmentId: ${var.compartment_id}
            displayName: ${var.agent_display_name}
            state: ${var.agent_state}
    

    Using getAgents

    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 getAgents(args: GetAgentsArgs, opts?: InvokeOptions): Promise<GetAgentsResult>
    function getAgentsOutput(args: GetAgentsOutputArgs, opts?: InvokeOptions): Output<GetAgentsResult>
    def get_agents(compartment_id: Optional[str] = None,
                   display_name: Optional[str] = None,
                   filters: Optional[Sequence[_databasemigration.GetAgentsFilter]] = None,
                   state: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetAgentsResult
    def get_agents_output(compartment_id: Optional[pulumi.Input[str]] = None,
                   display_name: Optional[pulumi.Input[str]] = None,
                   filters: Optional[pulumi.Input[Sequence[pulumi.Input[_databasemigration.GetAgentsFilterArgs]]]] = None,
                   state: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetAgentsResult]
    func GetAgents(ctx *Context, args *GetAgentsArgs, opts ...InvokeOption) (*GetAgentsResult, error)
    func GetAgentsOutput(ctx *Context, args *GetAgentsOutputArgs, opts ...InvokeOption) GetAgentsResultOutput

    > Note: This function is named GetAgents in the Go SDK.

    public static class GetAgents 
    {
        public static Task<GetAgentsResult> InvokeAsync(GetAgentsArgs args, InvokeOptions? opts = null)
        public static Output<GetAgentsResult> Invoke(GetAgentsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetAgentsResult> getAgents(GetAgentsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: oci:DatabaseMigration/getAgents:getAgents
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CompartmentId string

    The ID of the compartment in which to list resources.

    DisplayName string

    A filter to return only resources that match the entire display name given.

    Filters List<GetAgentsFilter>
    State string

    The current state of the Database Migration Deployment.

    CompartmentId string

    The ID of the compartment in which to list resources.

    DisplayName string

    A filter to return only resources that match the entire display name given.

    Filters []GetAgentsFilter
    State string

    The current state of the Database Migration Deployment.

    compartmentId String

    The ID of the compartment in which to list resources.

    displayName String

    A filter to return only resources that match the entire display name given.

    filters List<GetAgentsFilter>
    state String

    The current state of the Database Migration Deployment.

    compartmentId string

    The ID of the compartment in which to list resources.

    displayName string

    A filter to return only resources that match the entire display name given.

    filters GetAgentsFilter[]
    state string

    The current state of the Database Migration Deployment.

    compartment_id str

    The ID of the compartment in which to list resources.

    display_name str

    A filter to return only resources that match the entire display name given.

    filters GetAgentsFilter]
    state str

    The current state of the Database Migration Deployment.

    compartmentId String

    The ID of the compartment in which to list resources.

    displayName String

    A filter to return only resources that match the entire display name given.

    filters List<Property Map>
    state String

    The current state of the Database Migration Deployment.

    getAgents Result

    The following output properties are available:

    AgentCollections List<GetAgentsAgentCollection>

    The list of agent_collection.

    CompartmentId string

    OCID of the compartment

    Id string

    The provider-assigned unique ID for this managed resource.

    DisplayName string

    ODMS Agent name

    Filters List<GetAgentsFilter>
    State string

    The current state of the ODMS on-premises Agent.

    AgentCollections []GetAgentsAgentCollection

    The list of agent_collection.

    CompartmentId string

    OCID of the compartment

    Id string

    The provider-assigned unique ID for this managed resource.

    DisplayName string

    ODMS Agent name

    Filters []GetAgentsFilter
    State string

    The current state of the ODMS on-premises Agent.

    agentCollections List<GetAgentsAgentCollection>

    The list of agent_collection.

    compartmentId String

    OCID of the compartment

    id String

    The provider-assigned unique ID for this managed resource.

    displayName String

    ODMS Agent name

    filters List<GetAgentsFilter>
    state String

    The current state of the ODMS on-premises Agent.

    agentCollections GetAgentsAgentCollection[]

    The list of agent_collection.

    compartmentId string

    OCID of the compartment

    id string

    The provider-assigned unique ID for this managed resource.

    displayName string

    ODMS Agent name

    filters GetAgentsFilter[]
    state string

    The current state of the ODMS on-premises Agent.

    agent_collections GetAgentsAgentCollection]

    The list of agent_collection.

    compartment_id str

    OCID of the compartment

    id str

    The provider-assigned unique ID for this managed resource.

    display_name str

    ODMS Agent name

    filters GetAgentsFilter]
    state str

    The current state of the ODMS on-premises Agent.

    agentCollections List<Property Map>

    The list of agent_collection.

    compartmentId String

    OCID of the compartment

    id String

    The provider-assigned unique ID for this managed resource.

    displayName String

    ODMS Agent name

    filters List<Property Map>
    state String

    The current state of the ODMS on-premises Agent.

    Supporting Types

    GetAgentsAgentCollection

    GetAgentsAgentCollectionItem

    AgentId string
    CompartmentId string

    The ID of the compartment in which to list resources.

    DefinedTags Dictionary<string, object>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    DisplayName string

    A filter to return only resources that match the entire display name given.

    FreeformTags Dictionary<string, object>

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    Id string

    The OCID of the resource

    LifecycleDetails string

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    PublicKey string

    ODMS Agent public key.

    State string

    The current state of the Database Migration Deployment.

    StreamId string

    The OCID of the Stream

    SystemTags Dictionary<string, object>

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    TimeCreated string

    The time the Agent was created. An RFC3339 formatted datetime string.

    TimeUpdated string

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    Version string

    ODMS Agent version

    AgentId string
    CompartmentId string

    The ID of the compartment in which to list resources.

    DefinedTags map[string]interface{}

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    DisplayName string

    A filter to return only resources that match the entire display name given.

    FreeformTags map[string]interface{}

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    Id string

    The OCID of the resource

    LifecycleDetails string

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    PublicKey string

    ODMS Agent public key.

    State string

    The current state of the Database Migration Deployment.

    StreamId string

    The OCID of the Stream

    SystemTags map[string]interface{}

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    TimeCreated string

    The time the Agent was created. An RFC3339 formatted datetime string.

    TimeUpdated string

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    Version string

    ODMS Agent version

    agentId String
    compartmentId String

    The ID of the compartment in which to list resources.

    definedTags Map<String,Object>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    displayName String

    A filter to return only resources that match the entire display name given.

    freeformTags Map<String,Object>

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    id String

    The OCID of the resource

    lifecycleDetails String

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    publicKey String

    ODMS Agent public key.

    state String

    The current state of the Database Migration Deployment.

    streamId String

    The OCID of the Stream

    systemTags Map<String,Object>

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    timeCreated String

    The time the Agent was created. An RFC3339 formatted datetime string.

    timeUpdated String

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    version String

    ODMS Agent version

    agentId string
    compartmentId string

    The ID of the compartment in which to list resources.

    definedTags {[key: string]: any}

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    displayName string

    A filter to return only resources that match the entire display name given.

    freeformTags {[key: string]: any}

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    id string

    The OCID of the resource

    lifecycleDetails string

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    publicKey string

    ODMS Agent public key.

    state string

    The current state of the Database Migration Deployment.

    streamId string

    The OCID of the Stream

    systemTags {[key: string]: any}

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    timeCreated string

    The time the Agent was created. An RFC3339 formatted datetime string.

    timeUpdated string

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    version string

    ODMS Agent version

    agent_id str
    compartment_id str

    The ID of the compartment in which to list resources.

    defined_tags Mapping[str, Any]

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    display_name str

    A filter to return only resources that match the entire display name given.

    freeform_tags Mapping[str, Any]

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    id str

    The OCID of the resource

    lifecycle_details str

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    public_key str

    ODMS Agent public key.

    state str

    The current state of the Database Migration Deployment.

    stream_id str

    The OCID of the Stream

    system_tags Mapping[str, Any]

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    time_created str

    The time the Agent was created. An RFC3339 formatted datetime string.

    time_updated str

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    version str

    ODMS Agent version

    agentId String
    compartmentId String

    The ID of the compartment in which to list resources.

    definedTags Map<Any>

    Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: {"foo-namespace.bar-key": "value"}

    displayName String

    A filter to return only resources that match the entire display name given.

    freeformTags Map<Any>

    Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: {"bar-key": "value"}

    id String

    The OCID of the resource

    lifecycleDetails String

    A message describing the current state in more detail. For example, can be used to provide actionable information for a resource in Failed state.

    publicKey String

    ODMS Agent public key.

    state String

    The current state of the Database Migration Deployment.

    streamId String

    The OCID of the Stream

    systemTags Map<Any>

    Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {"orcl-cloud.free-tier-retained": "true"}

    timeCreated String

    The time the Agent was created. An RFC3339 formatted datetime string.

    timeUpdated String

    The time of the last Agent details update. An RFC3339 formatted datetime string.

    version String

    ODMS Agent version

    GetAgentsFilter

    Name string
    Values List<string>
    Regex bool
    Name string
    Values []string
    Regex bool
    name String
    values List<String>
    regex Boolean
    name string
    values string[]
    regex boolean
    name str
    values Sequence[str]
    regex bool
    name String
    values List<String>
    regex Boolean

    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 v1.11.0 published on Wednesday, Sep 27, 2023 by Pulumi