edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
edgecenter.getCdnShieldingLocation
Explore with Pulumi AI
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center
Represent shielding locations.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as edgecenter from "@pulumi/edgecenter";
const shieldDc = edgecenter.getCdnShieldingLocation({
datacenter: "dt",
});
const shielding = new edgecenter.CdnShielding("shielding", {
resourceId: 1,
shieldingPop: shieldDc.then(shieldDc => shieldDc.id),
});
import pulumi
import pulumi_edgecenter as edgecenter
shield_dc = edgecenter.get_cdn_shielding_location(datacenter="dt")
shielding = edgecenter.CdnShielding("shielding",
resource_id=1,
shielding_pop=shield_dc.id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/edgecenter/edgecenter"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
shieldDc, err := edgecenter.GetCdnShieldingLocation(ctx, &edgecenter.GetCdnShieldingLocationArgs{
Datacenter: "dt",
}, nil)
if err != nil {
return err
}
_, err = edgecenter.NewCdnShielding(ctx, "shielding", &edgecenter.CdnShieldingArgs{
ResourceId: pulumi.Float64(1),
ShieldingPop: pulumi.String(shieldDc.Id),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Edgecenter = Pulumi.Edgecenter;
return await Deployment.RunAsync(() =>
{
var shieldDc = Edgecenter.GetCdnShieldingLocation.Invoke(new()
{
Datacenter = "dt",
});
var shielding = new Edgecenter.CdnShielding("shielding", new()
{
ResourceId = 1,
ShieldingPop = shieldDc.Apply(getCdnShieldingLocationResult => getCdnShieldingLocationResult.Id),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.edgecenter.EdgecenterFunctions;
import com.pulumi.edgecenter.inputs.GetCdnShieldingLocationArgs;
import com.pulumi.edgecenter.CdnShielding;
import com.pulumi.edgecenter.CdnShieldingArgs;
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 shieldDc = EdgecenterFunctions.getCdnShieldingLocation(GetCdnShieldingLocationArgs.builder()
.datacenter("dt")
.build());
var shielding = new CdnShielding("shielding", CdnShieldingArgs.builder()
.resourceId(1)
.shieldingPop(shieldDc.applyValue(getCdnShieldingLocationResult -> getCdnShieldingLocationResult.id()))
.build());
}
}
resources:
shielding:
type: edgecenter:CdnShielding
properties:
resourceId: 1
shieldingPop: ${shieldDc.id}
variables:
shieldDc:
fn::invoke:
function: edgecenter:getCdnShieldingLocation
arguments:
datacenter: dt
Using getCdnShieldingLocation
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 getCdnShieldingLocation(args: GetCdnShieldingLocationArgs, opts?: InvokeOptions): Promise<GetCdnShieldingLocationResult>
function getCdnShieldingLocationOutput(args: GetCdnShieldingLocationOutputArgs, opts?: InvokeOptions): Output<GetCdnShieldingLocationResult>
def get_cdn_shielding_location(datacenter: Optional[str] = None,
id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetCdnShieldingLocationResult
def get_cdn_shielding_location_output(datacenter: Optional[pulumi.Input[str]] = None,
id: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetCdnShieldingLocationResult]
func GetCdnShieldingLocation(ctx *Context, args *GetCdnShieldingLocationArgs, opts ...InvokeOption) (*GetCdnShieldingLocationResult, error)
func GetCdnShieldingLocationOutput(ctx *Context, args *GetCdnShieldingLocationOutputArgs, opts ...InvokeOption) GetCdnShieldingLocationResultOutput
> Note: This function is named GetCdnShieldingLocation
in the Go SDK.
public static class GetCdnShieldingLocation
{
public static Task<GetCdnShieldingLocationResult> InvokeAsync(GetCdnShieldingLocationArgs args, InvokeOptions? opts = null)
public static Output<GetCdnShieldingLocationResult> Invoke(GetCdnShieldingLocationInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetCdnShieldingLocationResult> getCdnShieldingLocation(GetCdnShieldingLocationArgs args, InvokeOptions options)
public static Output<GetCdnShieldingLocationResult> getCdnShieldingLocation(GetCdnShieldingLocationArgs args, InvokeOptions options)
fn::invoke:
function: edgecenter:index/getCdnShieldingLocation:getCdnShieldingLocation
arguments:
# arguments dictionary
The following arguments are supported:
- Datacenter string
- Datacenter of shielding location.
- Id string
- The ID of this resource.
- Datacenter string
- Datacenter of shielding location.
- Id string
- The ID of this resource.
- datacenter String
- Datacenter of shielding location.
- id String
- The ID of this resource.
- datacenter string
- Datacenter of shielding location.
- id string
- The ID of this resource.
- datacenter str
- Datacenter of shielding location.
- id str
- The ID of this resource.
- datacenter String
- Datacenter of shielding location.
- id String
- The ID of this resource.
getCdnShieldingLocation Result
The following output properties are available:
- Datacenter string
- Datacenter of shielding location.
- Id string
- The ID of this resource.
- Datacenter string
- Datacenter of shielding location.
- Id string
- The ID of this resource.
- datacenter String
- Datacenter of shielding location.
- id String
- The ID of this resource.
- datacenter string
- Datacenter of shielding location.
- id string
- The ID of this resource.
- datacenter str
- Datacenter of shielding location.
- id str
- The ID of this resource.
- datacenter String
- Datacenter of shielding location.
- id String
- The ID of this resource.
Package Details
- Repository
- edgecenter edge-center/terraform-provider-edgecenter
- License
- Notes
- This Pulumi package is based on the
edgecenter
Terraform Provider.
edgecenter 0.8.0 published on Wednesday, Apr 30, 2025 by edge-center