OpenStack v4.1.3 published on Wednesday, Aug 21, 2024 by Pulumi
openstack.dns.getDnsZone
Explore with Pulumi AI
Use this data source to get the ID of an available OpenStack DNS zone.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as openstack from "@pulumi/openstack";
const zone1 = openstack.dns.getDnsZone({
name: "example.com",
});
import pulumi
import pulumi_openstack as openstack
zone1 = openstack.dns.get_dns_zone(name="example.com")
package main
import (
"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/dns"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := dns.GetDnsZone(ctx, &dns.GetDnsZoneArgs{
Name: pulumi.StringRef("example.com"),
}, 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 zone1 = OpenStack.Dns.GetDnsZone.Invoke(new()
{
Name = "example.com",
});
});
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.GetDnsZoneArgs;
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 zone1 = DnsFunctions.getDnsZone(GetDnsZoneArgs.builder()
.name("example.com")
.build());
}
}
variables:
zone1:
fn::invoke:
Function: openstack:dns:getDnsZone
Arguments:
name: example.com
Using getDnsZone
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 getDnsZone(args: GetDnsZoneArgs, opts?: InvokeOptions): Promise<GetDnsZoneResult>
function getDnsZoneOutput(args: GetDnsZoneOutputArgs, opts?: InvokeOptions): Output<GetDnsZoneResult>
def get_dns_zone(all_projects: Optional[str] = None,
attributes: Optional[Mapping[str, str]] = None,
created_at: Optional[str] = None,
description: Optional[str] = None,
email: Optional[str] = None,
masters: Optional[Sequence[str]] = None,
name: Optional[str] = None,
pool_id: Optional[str] = None,
project_id: Optional[str] = None,
region: Optional[str] = None,
serial: Optional[int] = None,
status: Optional[str] = None,
transferred_at: Optional[str] = None,
ttl: Optional[int] = None,
type: Optional[str] = None,
updated_at: Optional[str] = None,
version: Optional[int] = None,
opts: Optional[InvokeOptions] = None) -> GetDnsZoneResult
def get_dns_zone_output(all_projects: Optional[pulumi.Input[str]] = None,
attributes: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
created_at: Optional[pulumi.Input[str]] = None,
description: Optional[pulumi.Input[str]] = None,
email: Optional[pulumi.Input[str]] = None,
masters: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
name: Optional[pulumi.Input[str]] = None,
pool_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
region: Optional[pulumi.Input[str]] = None,
serial: Optional[pulumi.Input[int]] = None,
status: Optional[pulumi.Input[str]] = None,
transferred_at: Optional[pulumi.Input[str]] = None,
ttl: Optional[pulumi.Input[int]] = None,
type: Optional[pulumi.Input[str]] = None,
updated_at: Optional[pulumi.Input[str]] = None,
version: Optional[pulumi.Input[int]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDnsZoneResult]
func GetDnsZone(ctx *Context, args *GetDnsZoneArgs, opts ...InvokeOption) (*GetDnsZoneResult, error)
func GetDnsZoneOutput(ctx *Context, args *GetDnsZoneOutputArgs, opts ...InvokeOption) GetDnsZoneResultOutput
> Note: This function is named GetDnsZone
in the Go SDK.
public static class GetDnsZone
{
public static Task<GetDnsZoneResult> InvokeAsync(GetDnsZoneArgs args, InvokeOptions? opts = null)
public static Output<GetDnsZoneResult> Invoke(GetDnsZoneInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDnsZoneResult> getDnsZone(GetDnsZoneArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: openstack:dns/getDnsZone:getDnsZone
arguments:
# arguments dictionary
The following arguments are supported:
- All
Projects string - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- Attributes Dictionary<string, string>
- Attributes of the DNS Service scheduler.
- Created
At string - The time the zone was created.
- Description string
- A description of the zone.
- Email string
- The email contact for the zone record.
- Masters List<string>
- An array of master DNS servers. When
type
isSECONDARY
. - Name string
- The name of the zone.
- Pool
Id string - The ID of the pool hosting the zone.
- Project
Id string - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - Region string
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - Serial int
- The serial number of the zone.
- Status string
- The zone's status.
- Transferred
At string - The time the zone was transferred.
- Ttl int
- The time to live (TTL) of the zone.
- Type string
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - Updated
At string - The time the zone was last updated.
- Version int
- The version of the zone.
- All
Projects string - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- Attributes map[string]string
- Attributes of the DNS Service scheduler.
- Created
At string - The time the zone was created.
- Description string
- A description of the zone.
- Email string
- The email contact for the zone record.
- Masters []string
- An array of master DNS servers. When
type
isSECONDARY
. - Name string
- The name of the zone.
- Pool
Id string - The ID of the pool hosting the zone.
- Project
Id string - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - Region string
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - Serial int
- The serial number of the zone.
- Status string
- The zone's status.
- Transferred
At string - The time the zone was transferred.
- Ttl int
- The time to live (TTL) of the zone.
- Type string
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - Updated
At string - The time the zone was last updated.
- Version int
- The version of the zone.
- all
Projects String - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- attributes Map<String,String>
- Attributes of the DNS Service scheduler.
- created
At String - The time the zone was created.
- description String
- A description of the zone.
- email String
- The email contact for the zone record.
- masters List<String>
- An array of master DNS servers. When
type
isSECONDARY
. - name String
- The name of the zone.
- pool
Id String - The ID of the pool hosting the zone.
- project
Id String - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - region String
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - serial Integer
- The serial number of the zone.
- status String
- The zone's status.
- transferred
At String - The time the zone was transferred.
- ttl Integer
- The time to live (TTL) of the zone.
- type String
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - updated
At String - The time the zone was last updated.
- version Integer
- The version of the zone.
- all
Projects string - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- attributes {[key: string]: string}
- Attributes of the DNS Service scheduler.
- created
At string - The time the zone was created.
- description string
- A description of the zone.
- email string
- The email contact for the zone record.
- masters string[]
- An array of master DNS servers. When
type
isSECONDARY
. - name string
- The name of the zone.
- pool
Id string - The ID of the pool hosting the zone.
- project
Id string - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - region string
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - serial number
- The serial number of the zone.
- status string
- The zone's status.
- transferred
At string - The time the zone was transferred.
- ttl number
- The time to live (TTL) of the zone.
- type string
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - updated
At string - The time the zone was last updated.
- version number
- The version of the zone.
- all_
projects str - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- attributes Mapping[str, str]
- Attributes of the DNS Service scheduler.
- created_
at str - The time the zone was created.
- description str
- A description of the zone.
- email str
- The email contact for the zone record.
- masters Sequence[str]
- An array of master DNS servers. When
type
isSECONDARY
. - name str
- The name of the zone.
- pool_
id str - The ID of the pool hosting the zone.
- project_
id str - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - region str
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - serial int
- The serial number of the zone.
- status str
- The zone's status.
- transferred_
at str - The time the zone was transferred.
- ttl int
- The time to live (TTL) of the zone.
- type str
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - updated_
at str - The time the zone was last updated.
- version int
- The version of the zone.
- all
Projects String - Try to obtain zone ID by listing all projects (requires admin role by default, depends on your policy configuration)
- attributes Map<String>
- Attributes of the DNS Service scheduler.
- created
At String - The time the zone was created.
- description String
- A description of the zone.
- email String
- The email contact for the zone record.
- masters List<String>
- An array of master DNS servers. When
type
isSECONDARY
. - name String
- The name of the zone.
- pool
Id String - The ID of the pool hosting the zone.
- project
Id String - The ID of the project the DNS zone is obtained from,
sets
X-Auth-Sudo-Tenant-ID
header (requires an assigned user role in target project) - region String
- The region in which to obtain the V2 DNS client.
A DNS client is needed to retrieve zone ids. If omitted, the
region
argument of the provider is used. - serial Number
- The serial number of the zone.
- status String
- The zone's status.
- transferred
At String - The time the zone was transferred.
- ttl Number
- The time to live (TTL) of the zone.
- type String
- The type of the zone. Can either be
PRIMARY
orSECONDARY
. - updated
At String - The time the zone was last updated.
- version Number
- The version of the zone.
getDnsZone Result
The following output properties are available:
- Attributes Dictionary<string, string>
- Attributes of the DNS Service scheduler.
- Created
At string - The time the zone was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Masters List<string>
- An array of master DNS servers. When
type
isSECONDARY
. - Pool
Id string - The ID of the pool hosting the zone.
- Project
Id string - The project ID that owns the zone.
- Region string
- See Argument Reference above.
- Serial int
- The serial number of the zone.
- Transferred
At string - The time the zone was transferred.
- Updated
At string - The time the zone was last updated.
- Version int
- The version of the zone.
- All
Projects string - Description string
- See Argument Reference above.
- Email string
- See Argument Reference above.
- Name string
- See Argument Reference above.
- Status string
- See Argument Reference above.
- Ttl int
- See Argument Reference above.
- Type string
- See Argument Reference above.
- Attributes map[string]string
- Attributes of the DNS Service scheduler.
- Created
At string - The time the zone was created.
- Id string
- The provider-assigned unique ID for this managed resource.
- Masters []string
- An array of master DNS servers. When
type
isSECONDARY
. - Pool
Id string - The ID of the pool hosting the zone.
- Project
Id string - The project ID that owns the zone.
- Region string
- See Argument Reference above.
- Serial int
- The serial number of the zone.
- Transferred
At string - The time the zone was transferred.
- Updated
At string - The time the zone was last updated.
- Version int
- The version of the zone.
- All
Projects string - Description string
- See Argument Reference above.
- Email string
- See Argument Reference above.
- Name string
- See Argument Reference above.
- Status string
- See Argument Reference above.
- Ttl int
- See Argument Reference above.
- Type string
- See Argument Reference above.
- attributes Map<String,String>
- Attributes of the DNS Service scheduler.
- created
At String - The time the zone was created.
- id String
- The provider-assigned unique ID for this managed resource.
- masters List<String>
- An array of master DNS servers. When
type
isSECONDARY
. - pool
Id String - The ID of the pool hosting the zone.
- project
Id String - The project ID that owns the zone.
- region String
- See Argument Reference above.
- serial Integer
- The serial number of the zone.
- transferred
At String - The time the zone was transferred.
- updated
At String - The time the zone was last updated.
- version Integer
- The version of the zone.
- all
Projects String - description String
- See Argument Reference above.
- email String
- See Argument Reference above.
- name String
- See Argument Reference above.
- status String
- See Argument Reference above.
- ttl Integer
- See Argument Reference above.
- type String
- See Argument Reference above.
- attributes {[key: string]: string}
- Attributes of the DNS Service scheduler.
- created
At string - The time the zone was created.
- id string
- The provider-assigned unique ID for this managed resource.
- masters string[]
- An array of master DNS servers. When
type
isSECONDARY
. - pool
Id string - The ID of the pool hosting the zone.
- project
Id string - The project ID that owns the zone.
- region string
- See Argument Reference above.
- serial number
- The serial number of the zone.
- transferred
At string - The time the zone was transferred.
- updated
At string - The time the zone was last updated.
- version number
- The version of the zone.
- all
Projects string - description string
- See Argument Reference above.
- email string
- See Argument Reference above.
- name string
- See Argument Reference above.
- status string
- See Argument Reference above.
- ttl number
- See Argument Reference above.
- type string
- See Argument Reference above.
- attributes Mapping[str, str]
- Attributes of the DNS Service scheduler.
- created_
at str - The time the zone was created.
- id str
- The provider-assigned unique ID for this managed resource.
- masters Sequence[str]
- An array of master DNS servers. When
type
isSECONDARY
. - pool_
id str - The ID of the pool hosting the zone.
- project_
id str - The project ID that owns the zone.
- region str
- See Argument Reference above.
- serial int
- The serial number of the zone.
- transferred_
at str - The time the zone was transferred.
- updated_
at str - The time the zone was last updated.
- version int
- The version of the zone.
- all_
projects str - description str
- See Argument Reference above.
- email str
- See Argument Reference above.
- name str
- See Argument Reference above.
- status str
- See Argument Reference above.
- ttl int
- See Argument Reference above.
- type str
- See Argument Reference above.
- attributes Map<String>
- Attributes of the DNS Service scheduler.
- created
At String - The time the zone was created.
- id String
- The provider-assigned unique ID for this managed resource.
- masters List<String>
- An array of master DNS servers. When
type
isSECONDARY
. - pool
Id String - The ID of the pool hosting the zone.
- project
Id String - The project ID that owns the zone.
- region String
- See Argument Reference above.
- serial Number
- The serial number of the zone.
- transferred
At String - The time the zone was transferred.
- updated
At String - The time the zone was last updated.
- version Number
- The version of the zone.
- all
Projects String - description String
- See Argument Reference above.
- email String
- See Argument Reference above.
- name String
- See Argument Reference above.
- status String
- See Argument Reference above.
- ttl Number
- See Argument Reference above.
- type 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.