1. Packages
  2. Vra Provider
  3. API Docs
  4. getContentSource
vra 0.15.0 published on Tuesday, Aug 19, 2025 by vmware

vra.getContentSource

Explore with Pulumi AI

vra logo
vra 0.15.0 published on Tuesday, Aug 19, 2025 by vmware

    This is an example of how to lookup a content source data source:

    Content source data source by id:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getContentSource({
        id: _var.vra_content_source_id,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_content_source(id=var["vra_content_source_id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.LookupContentSource(ctx, &vra.LookupContentSourceArgs{
    			Id: pulumi.StringRef(_var.Vra_content_source_id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Vra.GetContentSource.Invoke(new()
        {
            Id = @var.Vra_content_source_id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.VraFunctions;
    import com.pulumi.vra.inputs.GetContentSourceArgs;
    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 this = VraFunctions.getContentSource(GetContentSourceArgs.builder()
                .id(var_.vra_content_source_id())
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getContentSource
          arguments:
            id: ${var.vra_content_source_id}
    

    Content source data source by name:

    import * as pulumi from "@pulumi/pulumi";
    import * as vra from "@pulumi/vra";
    
    const _this = vra.getContentSource({
        name: _var.vra_content_source_name,
    });
    
    import pulumi
    import pulumi_vra as vra
    
    this = vra.get_content_source(name=var["vra_content_source_name"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vra/vra"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vra.LookupContentSource(ctx, &vra.LookupContentSourceArgs{
    			Name: pulumi.StringRef(_var.Vra_content_source_name),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vra = Pulumi.Vra;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = Vra.GetContentSource.Invoke(new()
        {
            Name = @var.Vra_content_source_name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vra.VraFunctions;
    import com.pulumi.vra.inputs.GetContentSourceArgs;
    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 this = VraFunctions.getContentSource(GetContentSourceArgs.builder()
                .name(var_.vra_content_source_name())
                .build());
    
        }
    }
    
    variables:
      this:
        fn::invoke:
          function: vra:getContentSource
          arguments:
            name: ${var.vra_content_source_name}
    

    Using getContentSource

    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 getContentSource(args: GetContentSourceArgs, opts?: InvokeOptions): Promise<GetContentSourceResult>
    function getContentSourceOutput(args: GetContentSourceOutputArgs, opts?: InvokeOptions): Output<GetContentSourceResult>
    def get_content_source(id: Optional[str] = None,
                           name: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetContentSourceResult
    def get_content_source_output(id: Optional[pulumi.Input[str]] = None,
                           name: Optional[pulumi.Input[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetContentSourceResult]
    func LookupContentSource(ctx *Context, args *LookupContentSourceArgs, opts ...InvokeOption) (*LookupContentSourceResult, error)
    func LookupContentSourceOutput(ctx *Context, args *LookupContentSourceOutputArgs, opts ...InvokeOption) LookupContentSourceResultOutput

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

    public static class GetContentSource 
    {
        public static Task<GetContentSourceResult> InvokeAsync(GetContentSourceArgs args, InvokeOptions? opts = null)
        public static Output<GetContentSourceResult> Invoke(GetContentSourceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetContentSourceResult> getContentSource(GetContentSourceArgs args, InvokeOptions options)
    public static Output<GetContentSourceResult> getContentSource(GetContentSourceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: vra:index/getContentSource:getContentSource
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Id string
    The id of the content source instance.
    Name string

    The name of the content source instance.

    Note: One of id or name must be specified.

    Id string
    The id of the content source instance.
    Name string

    The name of the content source instance.

    Note: One of id or name must be specified.

    id String
    The id of the content source instance.
    name String

    The name of the content source instance.

    Note: One of id or name must be specified.

    id string
    The id of the content source instance.
    name string

    The name of the content source instance.

    Note: One of id or name must be specified.

    id str
    The id of the content source instance.
    name str

    The name of the content source instance.

    Note: One of id or name must be specified.

    id String
    The id of the content source instance.
    name String

    The name of the content source instance.

    Note: One of id or name must be specified.

    getContentSource Result

    The following output properties are available:

    Configs List<GetContentSourceConfig>
    The content source custom configuration.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Description string
    A human-friendly description for the content source instance.
    Id string
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    OrgId string
    The id of the organization this entity belongs to.
    ProjectId string
    The id of the project this entity belongs to.
    SyncEnabled bool
    Wether or not sync is enabled for this content source.
    TypeId string
    The type of this content source.
    Configs []GetContentSourceConfig
    The content source custom configuration.
    CreatedAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    CreatedBy string
    The user the entity was created by.
    Description string
    A human-friendly description for the content source instance.
    Id string
    LastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    LastUpdatedBy string
    The user the entity was last updated by.
    Name string
    OrgId string
    The id of the organization this entity belongs to.
    ProjectId string
    The id of the project this entity belongs to.
    SyncEnabled bool
    Wether or not sync is enabled for this content source.
    TypeId string
    The type of this content source.
    configs List<GetContentSourceConfig>
    The content source custom configuration.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    description String
    A human-friendly description for the content source instance.
    id String
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    orgId String
    The id of the organization this entity belongs to.
    projectId String
    The id of the project this entity belongs to.
    syncEnabled Boolean
    Wether or not sync is enabled for this content source.
    typeId String
    The type of this content source.
    configs GetContentSourceConfig[]
    The content source custom configuration.
    createdAt string
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy string
    The user the entity was created by.
    description string
    A human-friendly description for the content source instance.
    id string
    lastUpdatedAt string
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy string
    The user the entity was last updated by.
    name string
    orgId string
    The id of the organization this entity belongs to.
    projectId string
    The id of the project this entity belongs to.
    syncEnabled boolean
    Wether or not sync is enabled for this content source.
    typeId string
    The type of this content source.
    configs Sequence[GetContentSourceConfig]
    The content source custom configuration.
    created_at str
    Date when the entity was created. The date is in ISO 8601 and UTC.
    created_by str
    The user the entity was created by.
    description str
    A human-friendly description for the content source instance.
    id str
    last_updated_at str
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    last_updated_by str
    The user the entity was last updated by.
    name str
    org_id str
    The id of the organization this entity belongs to.
    project_id str
    The id of the project this entity belongs to.
    sync_enabled bool
    Wether or not sync is enabled for this content source.
    type_id str
    The type of this content source.
    configs List<Property Map>
    The content source custom configuration.
    createdAt String
    Date when the entity was created. The date is in ISO 8601 and UTC.
    createdBy String
    The user the entity was created by.
    description String
    A human-friendly description for the content source instance.
    id String
    lastUpdatedAt String
    Date when the entity was last updated. The date is ISO 8601 and UTC.
    lastUpdatedBy String
    The user the entity was last updated by.
    name String
    orgId String
    The id of the organization this entity belongs to.
    projectId String
    The id of the project this entity belongs to.
    syncEnabled Boolean
    Wether or not sync is enabled for this content source.
    typeId String
    The type of this content source.

    Supporting Types

    GetContentSourceConfig

    Branch string
    The content source branch name.
    ContentType string
    The content source type.
    IntegrationId string
    The content source integration id as seen integrations.
    Path string
    Path to refer to in the content source repository and branch.
    ProjectName string
    The name of the project.
    Repository string
    The content source repository.
    Branch string
    The content source branch name.
    ContentType string
    The content source type.
    IntegrationId string
    The content source integration id as seen integrations.
    Path string
    Path to refer to in the content source repository and branch.
    ProjectName string
    The name of the project.
    Repository string
    The content source repository.
    branch String
    The content source branch name.
    contentType String
    The content source type.
    integrationId String
    The content source integration id as seen integrations.
    path String
    Path to refer to in the content source repository and branch.
    projectName String
    The name of the project.
    repository String
    The content source repository.
    branch string
    The content source branch name.
    contentType string
    The content source type.
    integrationId string
    The content source integration id as seen integrations.
    path string
    Path to refer to in the content source repository and branch.
    projectName string
    The name of the project.
    repository string
    The content source repository.
    branch str
    The content source branch name.
    content_type str
    The content source type.
    integration_id str
    The content source integration id as seen integrations.
    path str
    Path to refer to in the content source repository and branch.
    project_name str
    The name of the project.
    repository str
    The content source repository.
    branch String
    The content source branch name.
    contentType String
    The content source type.
    integrationId String
    The content source integration id as seen integrations.
    path String
    Path to refer to in the content source repository and branch.
    projectName String
    The name of the project.
    repository String
    The content source repository.

    Package Details

    Repository
    vra vmware/terraform-provider-vra
    License
    Notes
    This Pulumi package is based on the vra Terraform Provider.
    vra logo
    vra 0.15.0 published on Tuesday, Aug 19, 2025 by vmware