1. Packages
  2. Ibm Provider
  3. API Docs
  4. getLogsRouterTargets
Viewing docs for ibm 1.89.0
published on Monday, Mar 2, 2026 by ibm-cloud
ibm logo
Viewing docs for ibm 1.89.0
published on Monday, Mar 2, 2026 by ibm-cloud

    Provides a read-only data source to retrieve information about logs_router_targets. You can then reference the fields of the data source in other resources within the same configuration by using interpolation syntax.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as ibm from "@pulumi/ibm";
    
    const logsRouterTargets = ibm.getLogsRouterTargets({
        name: logsRouterTargetInstance.name,
    });
    
    import pulumi
    import pulumi_ibm as ibm
    
    logs_router_targets = ibm.get_logs_router_targets(name=logs_router_target_instance["name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/ibm/ibm"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ibm.GetLogsRouterTargets(ctx, &ibm.GetLogsRouterTargetsArgs{
    			Name: pulumi.StringRef(logsRouterTargetInstance.Name),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Ibm = Pulumi.Ibm;
    
    return await Deployment.RunAsync(() => 
    {
        var logsRouterTargets = Ibm.GetLogsRouterTargets.Invoke(new()
        {
            Name = logsRouterTargetInstance.Name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.ibm.IbmFunctions;
    import com.pulumi.ibm.inputs.GetLogsRouterTargetsArgs;
    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 logsRouterTargets = IbmFunctions.getLogsRouterTargets(GetLogsRouterTargetsArgs.builder()
                .name(logsRouterTargetInstance.name())
                .build());
    
        }
    }
    
    variables:
      logsRouterTargets:
        fn::invoke:
          function: ibm:getLogsRouterTargets
          arguments:
            name: ${logsRouterTargetInstance.name}
    

    Using getLogsRouterTargets

    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 getLogsRouterTargets(args: GetLogsRouterTargetsArgs, opts?: InvokeOptions): Promise<GetLogsRouterTargetsResult>
    function getLogsRouterTargetsOutput(args: GetLogsRouterTargetsOutputArgs, opts?: InvokeOptions): Output<GetLogsRouterTargetsResult>
    def get_logs_router_targets(id: Optional[str] = None,
                                name: Optional[str] = None,
                                region: Optional[str] = None,
                                tenant_id: Optional[str] = None,
                                opts: Optional[InvokeOptions] = None) -> GetLogsRouterTargetsResult
    def get_logs_router_targets_output(id: Optional[pulumi.Input[str]] = None,
                                name: Optional[pulumi.Input[str]] = None,
                                region: Optional[pulumi.Input[str]] = None,
                                tenant_id: Optional[pulumi.Input[str]] = None,
                                opts: Optional[InvokeOptions] = None) -> Output[GetLogsRouterTargetsResult]
    func GetLogsRouterTargets(ctx *Context, args *GetLogsRouterTargetsArgs, opts ...InvokeOption) (*GetLogsRouterTargetsResult, error)
    func GetLogsRouterTargetsOutput(ctx *Context, args *GetLogsRouterTargetsOutputArgs, opts ...InvokeOption) GetLogsRouterTargetsResultOutput

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

    public static class GetLogsRouterTargets 
    {
        public static Task<GetLogsRouterTargetsResult> InvokeAsync(GetLogsRouterTargetsArgs args, InvokeOptions? opts = null)
        public static Output<GetLogsRouterTargetsResult> Invoke(GetLogsRouterTargetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetLogsRouterTargetsResult> getLogsRouterTargets(GetLogsRouterTargetsArgs args, InvokeOptions options)
    public static Output<GetLogsRouterTargetsResult> getLogsRouterTargets(GetLogsRouterTargetsArgs args, InvokeOptions options)
    
    fn::invoke:
      function: ibm:index/getLogsRouterTargets:getLogsRouterTargets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TenantId string
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TenantId string
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId String
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId string
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name str
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region str
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenant_id str
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId String

    getLogsRouterTargets Result

    The following output properties are available:

    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Targets List<GetLogsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    Name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TenantId string
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    Targets []GetLogsRouterTargetsTarget
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    Name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TenantId string
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets List<GetLogsRouterTargetsTarget>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name String
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId String
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets GetLogsRouterTargetsTarget[]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name string
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId string
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets Sequence[GetLogsRouterTargetsTarget]
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name str
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region str
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenant_id str
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    targets List<Property Map>
    (List) A list of target resources.

    • Constraints: The maximum length is 32 items. The minimum length is 0 items. Nested schema for targets:
    name String
    (String) The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    tenantId String

    Supporting Types

    GetLogsRouterTargetsTarget

    CreatedAt string
    (String) The timestamp of the target creation time.
    Crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    DestinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    Etag string
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    LogSinkCrn string
    ManagedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Parameters List<GetLogsRouterTargetsTargetParameter>
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TargetType string
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    Type string
    UpdatedAt string
    (String) The timestamp of the target last updated time.
    WriteStatuses List<GetLogsRouterTargetsTargetWriteStatus>
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:
    CreatedAt string
    (String) The timestamp of the target creation time.
    Crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    DestinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    Etag string
    Id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    LogSinkCrn string
    ManagedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    Name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    Parameters []GetLogsRouterTargetsTargetParameter
    Region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    TargetType string
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    Type string
    UpdatedAt string
    (String) The timestamp of the target last updated time.
    WriteStatuses []GetLogsRouterTargetsTargetWriteStatus
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:
    createdAt String
    (String) The timestamp of the target creation time.
    crn String
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn String
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    etag String
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    logSinkCrn String
    managedBy String
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    parameters List<GetLogsRouterTargetsTargetParameter>
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType String
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    type String
    updatedAt String
    (String) The timestamp of the target last updated time.
    writeStatuses List<GetLogsRouterTargetsTargetWriteStatus>
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:
    createdAt string
    (String) The timestamp of the target creation time.
    crn string
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn string
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    etag string
    id string
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    logSinkCrn string
    managedBy string
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name string
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    parameters GetLogsRouterTargetsTargetParameter[]
    region string
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType string
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    type string
    updatedAt string
    (String) The timestamp of the target last updated time.
    writeStatuses GetLogsRouterTargetsTargetWriteStatus[]
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:
    created_at str
    (String) The timestamp of the target creation time.
    crn str
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destination_crn str
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    etag str
    id str
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    log_sink_crn str
    managed_by str
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name str
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    parameters Sequence[GetLogsRouterTargetsTargetParameter]
    region str
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    target_type str
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    type str
    updated_at str
    (String) The timestamp of the target last updated time.
    write_statuses Sequence[GetLogsRouterTargetsTargetWriteStatus]
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:
    createdAt String
    (String) The timestamp of the target creation time.
    crn String
    (String) The crn of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters.
    destinationCrn String
    (String) Cloud Resource Name (CRN) of the destination resource. Ensure you have a service authorization between IBM Cloud Logs Routing and your Cloud resource. See service-to-service authorization for details.

    • Constraints: The maximum length is 1000 characters. The minimum length is 3 characters. The value must match regular expression /^[a-zA-Z0-9 \\-._:\/]+$/.
    etag String
    id String
    (String) The UUID of the target resource.

    • Constraints: The maximum length is 1028 characters. The minimum length is 24 characters.
    logSinkCrn String
    managedBy String
    (String) Present when the target is enterprise-managed (managed_by: enterprise). For account-managed targets this field is omitted.

    • Constraints: Allowable values are: enterprise, account.
    name String
    The name of the target resource.

    • Constraints: The maximum length is 1000 characters. The minimum length is 1 character.
    parameters List<Property Map>
    region String
    (String) Include this optional field if you used it to create a target in a different region other than the one you are connected.

    • Constraints: The maximum length is 256 characters. The minimum length is 3 characters.
    targetType String
    (String) The type of the target.

    • Constraints: Allowable values are: cloud_logs.
    type String
    updatedAt String
    (String) The timestamp of the target last updated time.
    writeStatuses List<Property Map>
    (List) The status of the write attempt to the target with the provided endpoint parameters. Nested schema for write_status:

    GetLogsRouterTargetsTargetParameter

    Host string
    Port double
    Host string
    Port float64
    host String
    port Double
    host string
    port number
    host str
    port float
    host String
    port Number

    GetLogsRouterTargetsTargetWriteStatus

    LastFailure string
    (String) The timestamp of the failure.
    ReasonForLastFailure string
    (String) Detailed description of the cause of the failure.
    Status string
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.
    LastFailure string
    (String) The timestamp of the failure.
    ReasonForLastFailure string
    (String) Detailed description of the cause of the failure.
    Status string
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.
    lastFailure String
    (String) The timestamp of the failure.
    reasonForLastFailure String
    (String) Detailed description of the cause of the failure.
    status String
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.
    lastFailure string
    (String) The timestamp of the failure.
    reasonForLastFailure string
    (String) Detailed description of the cause of the failure.
    status string
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.
    last_failure str
    (String) The timestamp of the failure.
    reason_for_last_failure str
    (String) Detailed description of the cause of the failure.
    status str
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.
    lastFailure String
    (String) The timestamp of the failure.
    reasonForLastFailure String
    (String) Detailed description of the cause of the failure.
    status String
    (String) The status such as failed or success.

    • Constraints: Allowable values are: success, failed.

    Package Details

    Repository
    ibm ibm-cloud/terraform-provider-ibm
    License
    Notes
    This Pulumi package is based on the ibm Terraform Provider.
    ibm logo
    Viewing docs for ibm 1.89.0
    published on Monday, Mar 2, 2026 by ibm-cloud
      Try Pulumi Cloud free. Your team will thank you.