Oracle Cloud Infrastructure v2.33.0 published on Thursday, May 1, 2025 by Pulumi
oci.FleetAppsManagement.getFleetTargets
Explore with Pulumi AI
This data source provides the list of Fleet Targets in Oracle Cloud Infrastructure Fleet Apps Management service.
Returns the list of all confirmed targets within a fleet.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as oci from "@pulumi/oci";
const testFleetTargets = oci.FleetAppsManagement.getFleetTargets({
    fleetId: testFleet.id,
    displayName: fleetTargetDisplayName,
    product: fleetTargetProduct,
    resourceDisplayName: fleetTargetResourceDisplayName,
    resourceId: testResource.id,
});
import pulumi
import pulumi_oci as oci
test_fleet_targets = oci.FleetAppsManagement.get_fleet_targets(fleet_id=test_fleet["id"],
    display_name=fleet_target_display_name,
    product=fleet_target_product,
    resource_display_name=fleet_target_resource_display_name,
    resource_id=test_resource["id"])
package main
import (
	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/fleetappsmanagement"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := fleetappsmanagement.GetFleetTargets(ctx, &fleetappsmanagement.GetFleetTargetsArgs{
			FleetId:             testFleet.Id,
			DisplayName:         pulumi.StringRef(fleetTargetDisplayName),
			Product:             pulumi.StringRef(fleetTargetProduct),
			ResourceDisplayName: pulumi.StringRef(fleetTargetResourceDisplayName),
			ResourceId:          pulumi.StringRef(testResource.Id),
		}, 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 testFleetTargets = Oci.FleetAppsManagement.GetFleetTargets.Invoke(new()
    {
        FleetId = testFleet.Id,
        DisplayName = fleetTargetDisplayName,
        Product = fleetTargetProduct,
        ResourceDisplayName = fleetTargetResourceDisplayName,
        ResourceId = testResource.Id,
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.oci.FleetAppsManagement.FleetAppsManagementFunctions;
import com.pulumi.oci.FleetAppsManagement.inputs.GetFleetTargetsArgs;
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 testFleetTargets = FleetAppsManagementFunctions.getFleetTargets(GetFleetTargetsArgs.builder()
            .fleetId(testFleet.id())
            .displayName(fleetTargetDisplayName)
            .product(fleetTargetProduct)
            .resourceDisplayName(fleetTargetResourceDisplayName)
            .resourceId(testResource.id())
            .build());
    }
}
variables:
  testFleetTargets:
    fn::invoke:
      function: oci:FleetAppsManagement:getFleetTargets
      arguments:
        fleetId: ${testFleet.id}
        displayName: ${fleetTargetDisplayName}
        product: ${fleetTargetProduct}
        resourceDisplayName: ${fleetTargetResourceDisplayName}
        resourceId: ${testResource.id}
Using getFleetTargets
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 getFleetTargets(args: GetFleetTargetsArgs, opts?: InvokeOptions): Promise<GetFleetTargetsResult>
function getFleetTargetsOutput(args: GetFleetTargetsOutputArgs, opts?: InvokeOptions): Output<GetFleetTargetsResult>def get_fleet_targets(display_name: Optional[str] = None,
                      filters: Optional[Sequence[GetFleetTargetsFilter]] = None,
                      fleet_id: Optional[str] = None,
                      product: Optional[str] = None,
                      resource_display_name: Optional[str] = None,
                      resource_id: Optional[str] = None,
                      opts: Optional[InvokeOptions] = None) -> GetFleetTargetsResult
def get_fleet_targets_output(display_name: Optional[pulumi.Input[str]] = None,
                      filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetFleetTargetsFilterArgs]]]] = None,
                      fleet_id: Optional[pulumi.Input[str]] = None,
                      product: Optional[pulumi.Input[str]] = None,
                      resource_display_name: Optional[pulumi.Input[str]] = None,
                      resource_id: Optional[pulumi.Input[str]] = None,
                      opts: Optional[InvokeOptions] = None) -> Output[GetFleetTargetsResult]func GetFleetTargets(ctx *Context, args *GetFleetTargetsArgs, opts ...InvokeOption) (*GetFleetTargetsResult, error)
func GetFleetTargetsOutput(ctx *Context, args *GetFleetTargetsOutputArgs, opts ...InvokeOption) GetFleetTargetsResultOutput> Note: This function is named GetFleetTargets in the Go SDK.
public static class GetFleetTargets 
{
    public static Task<GetFleetTargetsResult> InvokeAsync(GetFleetTargetsArgs args, InvokeOptions? opts = null)
    public static Output<GetFleetTargetsResult> Invoke(GetFleetTargetsInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetFleetTargetsResult> getFleetTargets(GetFleetTargetsArgs args, InvokeOptions options)
public static Output<GetFleetTargetsResult> getFleetTargets(GetFleetTargetsArgs args, InvokeOptions options)
fn::invoke:
  function: oci:FleetAppsManagement/getFleetTargets:getFleetTargets
  arguments:
    # arguments dictionaryThe following arguments are supported:
- FleetId string
- Unique Fleet identifier.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
List<GetFleet Targets Filter> 
- Product string
- Product Name.
- ResourceDisplay stringName 
- Resource Display Name.
- ResourceId string
- Resource Identifier
- FleetId string
- Unique Fleet identifier.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Filters
[]GetFleet Targets Filter 
- Product string
- Product Name.
- ResourceDisplay stringName 
- Resource Display Name.
- ResourceId string
- Resource Identifier
- fleetId String
- Unique Fleet identifier.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters
List<GetFleet Targets Filter> 
- product String
- Product Name.
- resourceDisplay StringName 
- Resource Display Name.
- resourceId String
- Resource Identifier
- fleetId string
- Unique Fleet identifier.
- displayName string
- A filter to return only resources that match the entire display name given.
- filters
GetFleet Targets Filter[] 
- product string
- Product Name.
- resourceDisplay stringName 
- Resource Display Name.
- resourceId string
- Resource Identifier
- fleet_id str
- Unique Fleet identifier.
- display_name str
- A filter to return only resources that match the entire display name given.
- filters
Sequence[GetFleet Targets Filter] 
- product str
- Product Name.
- resource_display_ strname 
- Resource Display Name.
- resource_id str
- Resource Identifier
- fleetId String
- Unique Fleet identifier.
- displayName String
- A filter to return only resources that match the entire display name given.
- filters List<Property Map>
- product String
- Product Name.
- resourceDisplay StringName 
- Resource Display Name.
- resourceId String
- Resource Identifier
getFleetTargets Result
The following output properties are available:
- FleetId string
- FleetTarget List<GetCollections Fleet Targets Fleet Target Collection> 
- The list of fleet_target_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Filters
List<GetFleet Targets Filter> 
- Product string
- Product to which the target belongs to.
- ResourceDisplay stringName 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- ResourceId string
- The OCID of the resource.
- FleetId string
- FleetTarget []GetCollections Fleet Targets Fleet Target Collection 
- The list of fleet_target_collection.
- Id string
- The provider-assigned unique ID for this managed resource.
- DisplayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- Filters
[]GetFleet Targets Filter 
- Product string
- Product to which the target belongs to.
- ResourceDisplay stringName 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- ResourceId string
- The OCID of the resource.
- fleetId String
- fleetTarget List<GetCollections Fleet Targets Fleet Target Collection> 
- The list of fleet_target_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- filters
List<GetFleet Targets Filter> 
- product String
- Product to which the target belongs to.
- resourceDisplay StringName 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- resourceId String
- The OCID of the resource.
- fleetId string
- fleetTarget GetCollections Fleet Targets Fleet Target Collection[] 
- The list of fleet_target_collection.
- id string
- The provider-assigned unique ID for this managed resource.
- displayName string
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- filters
GetFleet Targets Filter[] 
- product string
- Product to which the target belongs to.
- resourceDisplay stringName 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- resourceId string
- The OCID of the resource.
- fleet_id str
- fleet_target_ Sequence[Getcollections Fleet Targets Fleet Target Collection] 
- The list of fleet_target_collection.
- id str
- The provider-assigned unique ID for this managed resource.
- display_name str
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- filters
Sequence[GetFleet Targets Filter] 
- product str
- Product to which the target belongs to.
- resource_display_ strname 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- resource_id str
- The OCID of the resource.
- fleetId String
- fleetTarget List<Property Map>Collections 
- The list of fleet_target_collection.
- id String
- The provider-assigned unique ID for this managed resource.
- displayName String
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- filters List<Property Map>
- product String
- Product to which the target belongs to.
- resourceDisplay StringName 
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. Example: My new resource
- resourceId String
- The OCID of the resource.
Supporting Types
GetFleetTargetsFilter   
GetFleetTargetsFleetTargetCollection     
- Items
List<GetFleet Targets Fleet Target Collection Item> 
- List of fleetTargets.
- Items
[]GetFleet Targets Fleet Target Collection Item 
- List of fleetTargets.
- items
List<GetFleet Targets Fleet Target Collection Item> 
- List of fleetTargets.
- items
GetFleet Targets Fleet Target Collection Item[] 
- List of fleetTargets.
- items
Sequence[GetFleet Targets Fleet Target Collection Item] 
- List of fleetTargets.
- items List<Property Map>
- List of fleetTargets.
GetFleetTargetsFleetTargetCollectionItem      
- CompartmentId string
- Tenancy OCID
- ComplianceState string
- The last known compliance state of the target.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Id string
- The OCID of the resource.
- IsLast boolDiscovery Attempt Successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- Product string
- Product Name.
- Resources
List<GetFleet Targets Fleet Target Collection Item Resource> 
- Resource Information for the Target.
- State string
- The current state of the FleetTarget.
- Dictionary<string, string>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeOf stringLast Discovery Attempt 
- The time when last discovery was attempted.
- TimeOf stringLast Successful Discovery 
- The time when the last successful discovery was made.
- Version string
- Current version of target.
- CompartmentId string
- Tenancy OCID
- ComplianceState string
- The last known compliance state of the target.
- DisplayName string
- A filter to return only resources that match the entire display name given.
- Id string
- The OCID of the resource.
- IsLast boolDiscovery Attempt Successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- Product string
- Product Name.
- Resources
[]GetFleet Targets Fleet Target Collection Item Resource 
- Resource Information for the Target.
- State string
- The current state of the FleetTarget.
- map[string]string
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- TimeOf stringLast Discovery Attempt 
- The time when last discovery was attempted.
- TimeOf stringLast Successful Discovery 
- The time when the last successful discovery was made.
- Version string
- Current version of target.
- compartmentId String
- Tenancy OCID
- complianceState String
- The last known compliance state of the target.
- displayName String
- A filter to return only resources that match the entire display name given.
- id String
- The OCID of the resource.
- isLast BooleanDiscovery Attempt Successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- product String
- Product Name.
- resources
List<GetFleet Targets Fleet Target Collection Item Resource> 
- Resource Information for the Target.
- state String
- The current state of the FleetTarget.
- Map<String,String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeOf StringLast Discovery Attempt 
- The time when last discovery was attempted.
- timeOf StringLast Successful Discovery 
- The time when the last successful discovery was made.
- version String
- Current version of target.
- compartmentId string
- Tenancy OCID
- complianceState string
- The last known compliance state of the target.
- displayName string
- A filter to return only resources that match the entire display name given.
- id string
- The OCID of the resource.
- isLast booleanDiscovery Attempt Successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- product string
- Product Name.
- resources
GetFleet Targets Fleet Target Collection Item Resource[] 
- Resource Information for the Target.
- state string
- The current state of the FleetTarget.
- {[key: string]: string}
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeOf stringLast Discovery Attempt 
- The time when last discovery was attempted.
- timeOf stringLast Successful Discovery 
- The time when the last successful discovery was made.
- version string
- Current version of target.
- compartment_id str
- Tenancy OCID
- compliance_state str
- The last known compliance state of the target.
- display_name str
- A filter to return only resources that match the entire display name given.
- id str
- The OCID of the resource.
- is_last_ booldiscovery_ attempt_ successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- product str
- Product Name.
- resources
Sequence[GetFleet Targets Fleet Target Collection Item Resource] 
- Resource Information for the Target.
- state str
- The current state of the FleetTarget.
- Mapping[str, str]
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- time_of_ strlast_ discovery_ attempt 
- The time when last discovery was attempted.
- time_of_ strlast_ successful_ discovery 
- The time when the last successful discovery was made.
- version str
- Current version of target.
- compartmentId String
- Tenancy OCID
- complianceState String
- The last known compliance state of the target.
- displayName String
- A filter to return only resources that match the entire display name given.
- id String
- The OCID of the resource.
- isLast BooleanDiscovery Attempt Successful 
- A boolean flag that represents whether the last discovery attempt was successful.
- product String
- Product Name.
- resources List<Property Map>
- Resource Information for the Target.
- state String
- The current state of the FleetTarget.
- Map<String>
- System tags for this resource. Each key is predefined and scoped to a namespace. Example: {"orcl-cloud.free-tier-retained": "true"}
- timeOf StringLast Discovery Attempt 
- The time when last discovery was attempted.
- timeOf StringLast Successful Discovery 
- The time when the last successful discovery was made.
- version String
- Current version of target.
GetFleetTargetsFleetTargetCollectionItemResource       
- ResourceDisplay stringName 
- Resource Display Name.
- ResourceId string
- Resource Identifier
- ResourceDisplay stringName 
- Resource Display Name.
- ResourceId string
- Resource Identifier
- resourceDisplay StringName 
- Resource Display Name.
- resourceId String
- Resource Identifier
- resourceDisplay stringName 
- Resource Display Name.
- resourceId string
- Resource Identifier
- resource_display_ strname 
- Resource Display Name.
- resource_id str
- Resource Identifier
- resourceDisplay StringName 
- Resource Display Name.
- resourceId String
- Resource Identifier
Package Details
- Repository
- oci pulumi/pulumi-oci
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the ociTerraform Provider.