getProfile

Use this data source to access information about an existing CDN Profile.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.cdn.getProfile({
name: "myfirstcdnprofile",
resourceGroupName: "example-resources",
});
export const cdnProfileId = example.then(example => example.id);
import pulumi
import pulumi_azure as azure
example = azure.cdn.get_profile(name="myfirstcdnprofile",
resource_group_name="example-resources")
pulumi.export("cdnProfileId", example.id)
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Cdn.GetProfile.Invoke(new()
{
Name = "myfirstcdnprofile",
ResourceGroupName = "example-resources",
});
return new Dictionary<string, object?>
{
["cdnProfileId"] = example.Apply(getProfileResult => getProfileResult.Id),
};
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/cdn"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := cdn.LookupProfile(ctx, &cdn.LookupProfileArgs{
Name: "myfirstcdnprofile",
ResourceGroupName: "example-resources",
}, nil)
if err != nil {
return err
}
ctx.Export("cdnProfileId", example.Id)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.cdn.CdnFunctions;
import com.pulumi.azure.cdn.inputs.GetProfileArgs;
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 = CdnFunctions.getProfile(GetProfileArgs.builder()
.name("myfirstcdnprofile")
.resourceGroupName("example-resources")
.build());
ctx.export("cdnProfileId", example.applyValue(getProfileResult -> getProfileResult.id()));
}
}
variables:
example:
fn::invoke:
function: azure:cdn:getProfile
arguments:
name: myfirstcdnprofile
resourceGroupName: example-resources
outputs:
cdnProfileId: ${example.id}

Return

A collection of values returned by getProfile.

Parameters

argument

A collection of arguments for invoking getProfile.


suspend fun getProfile(name: String, resourceGroupName: String): GetProfileResult

Return

A collection of values returned by getProfile.

Parameters

name

The name of the CDN Profile.

resourceGroupName

The name of the resource group in which the CDN Profile exists.

See also


suspend fun getProfile(argument: suspend GetProfilePlainArgsBuilder.() -> Unit): GetProfileResult

Return

A collection of values returned by getProfile.

Parameters

argument

Builder for com.pulumi.azure.cdn.kotlin.inputs.GetProfilePlainArgs.

See also