azure logo
Azure Classic v5.43.0, May 6 23

azure.network.getServiceTags

Explore with Pulumi AI

Use this data source to access information about Service Tags.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.Network.GetServiceTags.Invoke(new()
    {
        Location = "westcentralus",
        Service = "AzureKeyVault",
        LocationFilter = "northeurope",
    });

    return new Dictionary<string, object?>
    {
        ["addressPrefixes"] = example.Apply(getServiceTagsResult => getServiceTagsResult.AddressPrefixes),
        ["ipv4Cidrs"] = example.Apply(getServiceTagsResult => getServiceTagsResult.Ipv4Cidrs),
    };
});
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/network"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := network.GetServiceTags(ctx, &network.GetServiceTagsArgs{
			Location:       "westcentralus",
			Service:        "AzureKeyVault",
			LocationFilter: pulumi.StringRef("northeurope"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("addressPrefixes", example.AddressPrefixes)
		ctx.Export("ipv4Cidrs", example.Ipv4Cidrs)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.network.NetworkFunctions;
import com.pulumi.azure.network.inputs.GetServiceTagsArgs;
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 = NetworkFunctions.getServiceTags(GetServiceTagsArgs.builder()
            .location("westcentralus")
            .service("AzureKeyVault")
            .locationFilter("northeurope")
            .build());

        ctx.export("addressPrefixes", example.applyValue(getServiceTagsResult -> getServiceTagsResult.addressPrefixes()));
        ctx.export("ipv4Cidrs", example.applyValue(getServiceTagsResult -> getServiceTagsResult.ipv4Cidrs()));
    }
}
import pulumi
import pulumi_azure as azure

example = azure.network.get_service_tags(location="westcentralus",
    service="AzureKeyVault",
    location_filter="northeurope")
pulumi.export("addressPrefixes", example.address_prefixes)
pulumi.export("ipv4Cidrs", example.ipv4_cidrs)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.network.getServiceTags({
    location: "westcentralus",
    service: "AzureKeyVault",
    locationFilter: "northeurope",
});
export const addressPrefixes = example.then(example => example.addressPrefixes);
export const ipv4Cidrs = example.then(example => example.ipv4Cidrs);
variables:
  example:
    fn::invoke:
      Function: azure:network:getServiceTags
      Arguments:
        location: westcentralus
        service: AzureKeyVault
        locationFilter: northeurope
outputs:
  addressPrefixes: ${example.addressPrefixes}
  ipv4Cidrs: ${example.ipv4Cidrs}

Using getServiceTags

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 getServiceTags(args: GetServiceTagsArgs, opts?: InvokeOptions): Promise<GetServiceTagsResult>
function getServiceTagsOutput(args: GetServiceTagsOutputArgs, opts?: InvokeOptions): Output<GetServiceTagsResult>
def get_service_tags(location: Optional[str] = None,
                     location_filter: Optional[str] = None,
                     service: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetServiceTagsResult
def get_service_tags_output(location: Optional[pulumi.Input[str]] = None,
                     location_filter: Optional[pulumi.Input[str]] = None,
                     service: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetServiceTagsResult]
func GetServiceTags(ctx *Context, args *GetServiceTagsArgs, opts ...InvokeOption) (*GetServiceTagsResult, error)
func GetServiceTagsOutput(ctx *Context, args *GetServiceTagsOutputArgs, opts ...InvokeOption) GetServiceTagsResultOutput

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

public static class GetServiceTags 
{
    public static Task<GetServiceTagsResult> InvokeAsync(GetServiceTagsArgs args, InvokeOptions? opts = null)
    public static Output<GetServiceTagsResult> Invoke(GetServiceTagsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetServiceTagsResult> getServiceTags(GetServiceTagsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:network/getServiceTags:getServiceTags
  arguments:
    # arguments dictionary

The following arguments are supported:

Location string

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

Service string

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

LocationFilter string

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

Location string

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

Service string

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

LocationFilter string

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

location String

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

service String

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

locationFilter String

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

location string

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

service string

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

locationFilter string

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

location str

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

service str

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

location_filter str

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

location String

The Azure Region where the Service Tags exists. This value is not used to filter the results but for specifying the region to request. For filtering by region use location_filter instead. More information can be found here: Service Tags URL parameters.

service String

The type of the service for which address prefixes will be fetched. Available service tags can be found here: Available service tags.

locationFilter String

Changes the scope of the service tags. Can be any value that is also valid for location. If this field is empty then all address prefixes are considered instead of only location specific ones.

getServiceTags Result

The following output properties are available:

AddressPrefixes List<string>

List of address prefixes for the service type (and optionally a specific region).

Id string

The provider-assigned unique ID for this managed resource.

Ipv4Cidrs List<string>

List of IPv4 addresses for the service type (and optionally a specific region)

Ipv6Cidrs List<string>

List of IPv6 addresses for the service type (and optionally a specific region)

Location string
Service string
LocationFilter string
AddressPrefixes []string

List of address prefixes for the service type (and optionally a specific region).

Id string

The provider-assigned unique ID for this managed resource.

Ipv4Cidrs []string

List of IPv4 addresses for the service type (and optionally a specific region)

Ipv6Cidrs []string

List of IPv6 addresses for the service type (and optionally a specific region)

Location string
Service string
LocationFilter string
addressPrefixes List<String>

List of address prefixes for the service type (and optionally a specific region).

id String

The provider-assigned unique ID for this managed resource.

ipv4Cidrs List<String>

List of IPv4 addresses for the service type (and optionally a specific region)

ipv6Cidrs List<String>

List of IPv6 addresses for the service type (and optionally a specific region)

location String
service String
locationFilter String
addressPrefixes string[]

List of address prefixes for the service type (and optionally a specific region).

id string

The provider-assigned unique ID for this managed resource.

ipv4Cidrs string[]

List of IPv4 addresses for the service type (and optionally a specific region)

ipv6Cidrs string[]

List of IPv6 addresses for the service type (and optionally a specific region)

location string
service string
locationFilter string
address_prefixes Sequence[str]

List of address prefixes for the service type (and optionally a specific region).

id str

The provider-assigned unique ID for this managed resource.

ipv4_cidrs Sequence[str]

List of IPv4 addresses for the service type (and optionally a specific region)

ipv6_cidrs Sequence[str]

List of IPv6 addresses for the service type (and optionally a specific region)

location str
service str
location_filter str
addressPrefixes List<String>

List of address prefixes for the service type (and optionally a specific region).

id String

The provider-assigned unique ID for this managed resource.

ipv4Cidrs List<String>

List of IPv4 addresses for the service type (and optionally a specific region)

ipv6Cidrs List<String>

List of IPv6 addresses for the service type (and optionally a specific region)

location String
service String
locationFilter String

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.