1. Packages
  2. Openstack Provider
  3. API Docs
  4. dns
  5. getZoneShareV2
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

openstack.dns.getZoneShareV2

Explore with Pulumi AI

openstack logo
OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi

    Use this data source to get information about a DNS zone share.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const example = openstack.dns.getZoneShareV2({
        zoneId: "00000000-0000-0000-0000-000000000000",
        targetProjectId: "11111111-1111-1111-1111-111111111111",
        projectId: "22222222-2222-2222-2222-222222222222",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    example = openstack.dns.get_zone_share_v2(zone_id="00000000-0000-0000-0000-000000000000",
        target_project_id="11111111-1111-1111-1111-111111111111",
        project_id="22222222-2222-2222-2222-222222222222")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/dns"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dns.LookupZoneShareV2(ctx, &dns.LookupZoneShareV2Args{
    			ZoneId:          "00000000-0000-0000-0000-000000000000",
    			TargetProjectId: pulumi.StringRef("11111111-1111-1111-1111-111111111111"),
    			ProjectId:       pulumi.StringRef("22222222-2222-2222-2222-222222222222"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var example = OpenStack.Dns.GetZoneShareV2.Invoke(new()
        {
            ZoneId = "00000000-0000-0000-0000-000000000000",
            TargetProjectId = "11111111-1111-1111-1111-111111111111",
            ProjectId = "22222222-2222-2222-2222-222222222222",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.dns.DnsFunctions;
    import com.pulumi.openstack.dns.inputs.GetZoneShareV2Args;
    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 example = DnsFunctions.getZoneShareV2(GetZoneShareV2Args.builder()
                .zoneId("00000000-0000-0000-0000-000000000000")
                .targetProjectId("11111111-1111-1111-1111-111111111111")
                .projectId("22222222-2222-2222-2222-222222222222")
                .build());
    
        }
    }
    
    variables:
      example:
        fn::invoke:
          function: openstack:dns:getZoneShareV2
          arguments:
            zoneId: 00000000-0000-0000-0000-000000000000
            targetProjectId: 11111111-1111-1111-1111-111111111111
            projectId: 22222222-2222-2222-2222-222222222222
    

    Using getZoneShareV2

    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 getZoneShareV2(args: GetZoneShareV2Args, opts?: InvokeOptions): Promise<GetZoneShareV2Result>
    function getZoneShareV2Output(args: GetZoneShareV2OutputArgs, opts?: InvokeOptions): Output<GetZoneShareV2Result>
    def get_zone_share_v2(all_projects: Optional[str] = None,
                          project_id: Optional[str] = None,
                          region: Optional[str] = None,
                          share_id: Optional[str] = None,
                          target_project_id: Optional[str] = None,
                          zone_id: Optional[str] = None,
                          opts: Optional[InvokeOptions] = None) -> GetZoneShareV2Result
    def get_zone_share_v2_output(all_projects: Optional[pulumi.Input[str]] = None,
                          project_id: Optional[pulumi.Input[str]] = None,
                          region: Optional[pulumi.Input[str]] = None,
                          share_id: Optional[pulumi.Input[str]] = None,
                          target_project_id: Optional[pulumi.Input[str]] = None,
                          zone_id: Optional[pulumi.Input[str]] = None,
                          opts: Optional[InvokeOptions] = None) -> Output[GetZoneShareV2Result]
    func LookupZoneShareV2(ctx *Context, args *LookupZoneShareV2Args, opts ...InvokeOption) (*LookupZoneShareV2Result, error)
    func LookupZoneShareV2Output(ctx *Context, args *LookupZoneShareV2OutputArgs, opts ...InvokeOption) LookupZoneShareV2ResultOutput

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

    public static class GetZoneShareV2 
    {
        public static Task<GetZoneShareV2Result> InvokeAsync(GetZoneShareV2Args args, InvokeOptions? opts = null)
        public static Output<GetZoneShareV2Result> Invoke(GetZoneShareV2InvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetZoneShareV2Result> getZoneShareV2(GetZoneShareV2Args args, InvokeOptions options)
    public static Output<GetZoneShareV2Result> getZoneShareV2(GetZoneShareV2Args args, InvokeOptions options)
    
    fn::invoke:
      function: openstack:dns/getZoneShareV2:getZoneShareV2
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    The ID of the DNS zone for which to get share.
    AllProjects string
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    ProjectId string
    The owner project ID. If omitted, it is derived from the zone share details.
    Region string
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    ShareId string
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    TargetProjectId string
    If provided, the data source returns the share with this target project ID.
    ZoneId string
    The ID of the DNS zone for which to get share.
    AllProjects string
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    ProjectId string
    The owner project ID. If omitted, it is derived from the zone share details.
    Region string
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    ShareId string
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    TargetProjectId string
    If provided, the data source returns the share with this target project ID.
    zoneId String
    The ID of the DNS zone for which to get share.
    allProjects String
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    projectId String
    The owner project ID. If omitted, it is derived from the zone share details.
    region String
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    shareId String
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    targetProjectId String
    If provided, the data source returns the share with this target project ID.
    zoneId string
    The ID of the DNS zone for which to get share.
    allProjects string
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    projectId string
    The owner project ID. If omitted, it is derived from the zone share details.
    region string
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    shareId string
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    targetProjectId string
    If provided, the data source returns the share with this target project ID.
    zone_id str
    The ID of the DNS zone for which to get share.
    all_projects str
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    project_id str
    The owner project ID. If omitted, it is derived from the zone share details.
    region str
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    share_id str
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    target_project_id str
    If provided, the data source returns the share with this target project ID.
    zoneId String
    The ID of the DNS zone for which to get share.
    allProjects String
    If set to true, the data source will search across all projects. If set to false, it will only search within the current project. Defaults to false.
    projectId String
    The owner project ID. If omitted, it is derived from the zone share details.
    region String
    The region in which to obtain the V2 DNS client. If omitted, the region argument of the provider is used. Changing this creates a new DNS zone share data source.
    shareId String
    The ID of the DNS zone share to retrieve. If provided, the data source returns only the share with this ID.
    targetProjectId String
    If provided, the data source returns the share with this target project ID.

    getZoneShareV2 Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    See Argument Reference above.
    ShareId string
    The ID of the zone share.
    ZoneId string
    See Argument Reference above.
    AllProjects string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    TargetProjectId string
    See Argument Reference above.
    Id string
    The provider-assigned unique ID for this managed resource.
    Region string
    See Argument Reference above.
    ShareId string
    The ID of the zone share.
    ZoneId string
    See Argument Reference above.
    AllProjects string
    See Argument Reference above.
    ProjectId string
    See Argument Reference above.
    TargetProjectId string
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    See Argument Reference above.
    shareId String
    The ID of the zone share.
    zoneId String
    See Argument Reference above.
    allProjects String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    targetProjectId String
    See Argument Reference above.
    id string
    The provider-assigned unique ID for this managed resource.
    region string
    See Argument Reference above.
    shareId string
    The ID of the zone share.
    zoneId string
    See Argument Reference above.
    allProjects string
    See Argument Reference above.
    projectId string
    See Argument Reference above.
    targetProjectId string
    See Argument Reference above.
    id str
    The provider-assigned unique ID for this managed resource.
    region str
    See Argument Reference above.
    share_id str
    The ID of the zone share.
    zone_id str
    See Argument Reference above.
    all_projects str
    See Argument Reference above.
    project_id str
    See Argument Reference above.
    target_project_id str
    See Argument Reference above.
    id String
    The provider-assigned unique ID for this managed resource.
    region String
    See Argument Reference above.
    shareId String
    The ID of the zone share.
    zoneId String
    See Argument Reference above.
    allProjects String
    See Argument Reference above.
    projectId String
    See Argument Reference above.
    targetProjectId String
    See Argument Reference above.

    Package Details

    Repository
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v5.3.2 published on Friday, Jul 18, 2025 by Pulumi