cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community
cloudfoundry.getServiceInstance
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community
Gets information on a Cloud Foundry service instance.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const my_instance = cloudfoundry.getServiceInstance({
    nameOrId: "my-service-instance",
    space: "space-id",
});
import pulumi
import pulumi_cloudfoundry as cloudfoundry
my_instance = cloudfoundry.get_service_instance(name_or_id="my-service-instance",
    space="space-id")
package main
import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cloudfoundry.LookupServiceInstance(ctx, &cloudfoundry.LookupServiceInstanceArgs{
			NameOrId: "my-service-instance",
			Space:    "space-id",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;
return await Deployment.RunAsync(() => 
{
    var my_instance = Cloudfoundry.GetServiceInstance.Invoke(new()
    {
        NameOrId = "my-service-instance",
        Space = "space-id",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.CloudfoundryFunctions;
import com.pulumi.cloudfoundry.inputs.GetServiceInstanceArgs;
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 my-instance = CloudfoundryFunctions.getServiceInstance(GetServiceInstanceArgs.builder()
            .nameOrId("my-service-instance")
            .space("space-id")
            .build());
    }
}
variables:
  my-instance:
    fn::invoke:
      function: cloudfoundry:getServiceInstance
      arguments:
        nameOrId: my-service-instance
        space: space-id
Using getServiceInstance
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 getServiceInstance(args: GetServiceInstanceArgs, opts?: InvokeOptions): Promise<GetServiceInstanceResult>
function getServiceInstanceOutput(args: GetServiceInstanceOutputArgs, opts?: InvokeOptions): Output<GetServiceInstanceResult>def get_service_instance(id: Optional[str] = None,
                         name_or_id: Optional[str] = None,
                         space: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetServiceInstanceResult
def get_service_instance_output(id: Optional[pulumi.Input[str]] = None,
                         name_or_id: Optional[pulumi.Input[str]] = None,
                         space: Optional[pulumi.Input[str]] = None,
                         opts: Optional[InvokeOptions] = None) -> Output[GetServiceInstanceResult]func LookupServiceInstance(ctx *Context, args *LookupServiceInstanceArgs, opts ...InvokeOption) (*LookupServiceInstanceResult, error)
func LookupServiceInstanceOutput(ctx *Context, args *LookupServiceInstanceOutputArgs, opts ...InvokeOption) LookupServiceInstanceResultOutput> Note: This function is named LookupServiceInstance in the Go SDK.
public static class GetServiceInstance 
{
    public static Task<GetServiceInstanceResult> InvokeAsync(GetServiceInstanceArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceInstanceResult> Invoke(GetServiceInstanceInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceInstanceResult> getServiceInstance(GetServiceInstanceArgs args, InvokeOptions options)
public static Output<GetServiceInstanceResult> getServiceInstance(GetServiceInstanceArgs args, InvokeOptions options)
fn::invoke:
  function: cloudfoundry:index/getServiceInstance:getServiceInstance
  arguments:
    # arguments dictionaryThe following arguments are supported:
- name_or_ strid 
- The name of the service instance or its guid.
- space str
- The space guid of the app.
- id str
- The GUID of the service instance.
getServiceInstance Result
The following output properties are available:
- Id string
- The GUID of the service instance.
- Name string
- The name of the service instance.
- NameOr stringId 
- ServicePlan stringId 
- The service plan used by the service instance.
- Space string
- List<string>
- Tags set during service instance creations.
- Id string
- The GUID of the service instance.
- Name string
- The name of the service instance.
- NameOr stringId 
- ServicePlan stringId 
- The service plan used by the service instance.
- Space string
- []string
- Tags set during service instance creations.
- id String
- The GUID of the service instance.
- name String
- The name of the service instance.
- nameOr StringId 
- servicePlan StringId 
- The service plan used by the service instance.
- space String
- List<String>
- Tags set during service instance creations.
- id string
- The GUID of the service instance.
- name string
- The name of the service instance.
- nameOr stringId 
- servicePlan stringId 
- The service plan used by the service instance.
- space string
- string[]
- Tags set during service instance creations.
- id str
- The GUID of the service instance.
- name str
- The name of the service instance.
- name_or_ strid 
- service_plan_ strid 
- The service plan used by the service instance.
- space str
- Sequence[str]
- Tags set during service instance creations.
- id String
- The GUID of the service instance.
- name String
- The name of the service instance.
- nameOr StringId 
- servicePlan StringId 
- The service plan used by the service instance.
- space String
- List<String>
- Tags set during service instance creations.
Package Details
- Repository
- cloudfoundry cloudfoundry-community/terraform-provider-cloudfoundry
- License
- Notes
- This Pulumi package is based on the cloudfoundryTerraform Provider.
cloudfoundry 0.54.0 published on Monday, Apr 14, 2025 by cloudfoundry-community
