gcore 0.22.0 published on Wednesday, Apr 30, 2025 by g-core
gcore.getDdosProfileTemplate
Explore with Pulumi AI
Represents list of available DDoS protection profile templates
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as gcore from "@pulumi/gcore";
const pr = gcore.getProject({
name: "test",
});
const rg = gcore.getRegion({
name: "ED-10 Preprod",
});
const template = Promise.all([rg, pr]).then(([rg, pr]) => gcore.getDdosProfileTemplate({
templateId: 63,
regionId: rg.id,
projectId: pr.id,
}));
export const view = template;
import pulumi
import pulumi_gcore as gcore
pr = gcore.get_project(name="test")
rg = gcore.get_region(name="ED-10 Preprod")
template = gcore.get_ddos_profile_template(template_id=63,
region_id=rg.id,
project_id=pr.id)
pulumi.export("view", template)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/gcore/gcore"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
pr, err := gcore.GetProject(ctx, &gcore.GetProjectArgs{
Name: "test",
}, nil)
if err != nil {
return err
}
rg, err := gcore.GetRegion(ctx, &gcore.GetRegionArgs{
Name: "ED-10 Preprod",
}, nil)
if err != nil {
return err
}
template, err := gcore.GetDdosProfileTemplate(ctx, &gcore.GetDdosProfileTemplateArgs{
TemplateId: pulumi.Float64Ref(63),
RegionId: pulumi.Float64Ref(rg.Id),
ProjectId: pulumi.Float64Ref(pr.Id),
}, nil)
if err != nil {
return err
}
ctx.Export("view", template)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcore = Pulumi.Gcore;
return await Deployment.RunAsync(() =>
{
var pr = Gcore.GetProject.Invoke(new()
{
Name = "test",
});
var rg = Gcore.GetRegion.Invoke(new()
{
Name = "ED-10 Preprod",
});
var template = Gcore.GetDdosProfileTemplate.Invoke(new()
{
TemplateId = 63,
RegionId = rg.Apply(getRegionResult => getRegionResult.Id),
ProjectId = pr.Apply(getProjectResult => getProjectResult.Id),
});
return new Dictionary<string, object?>
{
["view"] = template,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcore.GcoreFunctions;
import com.pulumi.gcore.inputs.GetProjectArgs;
import com.pulumi.gcore.inputs.GetRegionArgs;
import com.pulumi.gcore.inputs.GetDdosProfileTemplateArgs;
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 pr = GcoreFunctions.getProject(GetProjectArgs.builder()
.name("test")
.build());
final var rg = GcoreFunctions.getRegion(GetRegionArgs.builder()
.name("ED-10 Preprod")
.build());
final var template = GcoreFunctions.getDdosProfileTemplate(GetDdosProfileTemplateArgs.builder()
.templateId(63)
.regionId(rg.applyValue(getRegionResult -> getRegionResult.id()))
.projectId(pr.applyValue(getProjectResult -> getProjectResult.id()))
.build());
ctx.export("view", template.applyValue(getDdosProfileTemplateResult -> getDdosProfileTemplateResult));
}
}
variables:
pr:
fn::invoke:
function: gcore:getProject
arguments:
name: test
rg:
fn::invoke:
function: gcore:getRegion
arguments:
name: ED-10 Preprod
template:
fn::invoke:
function: gcore:getDdosProfileTemplate
arguments:
templateId: 63
regionId: ${rg.id}
projectId: ${pr.id}
outputs:
view: ${template}
Using getDdosProfileTemplate
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 getDdosProfileTemplate(args: GetDdosProfileTemplateArgs, opts?: InvokeOptions): Promise<GetDdosProfileTemplateResult>
function getDdosProfileTemplateOutput(args: GetDdosProfileTemplateOutputArgs, opts?: InvokeOptions): Output<GetDdosProfileTemplateResult>
def get_ddos_profile_template(id: Optional[str] = None,
name: Optional[str] = None,
project_id: Optional[float] = None,
project_name: Optional[str] = None,
region_id: Optional[float] = None,
region_name: Optional[str] = None,
template_id: Optional[float] = None,
opts: Optional[InvokeOptions] = None) -> GetDdosProfileTemplateResult
def get_ddos_profile_template_output(id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[float]] = None,
project_name: Optional[pulumi.Input[str]] = None,
region_id: Optional[pulumi.Input[float]] = None,
region_name: Optional[pulumi.Input[str]] = None,
template_id: Optional[pulumi.Input[float]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDdosProfileTemplateResult]
func GetDdosProfileTemplate(ctx *Context, args *GetDdosProfileTemplateArgs, opts ...InvokeOption) (*GetDdosProfileTemplateResult, error)
func GetDdosProfileTemplateOutput(ctx *Context, args *GetDdosProfileTemplateOutputArgs, opts ...InvokeOption) GetDdosProfileTemplateResultOutput
> Note: This function is named GetDdosProfileTemplate
in the Go SDK.
public static class GetDdosProfileTemplate
{
public static Task<GetDdosProfileTemplateResult> InvokeAsync(GetDdosProfileTemplateArgs args, InvokeOptions? opts = null)
public static Output<GetDdosProfileTemplateResult> Invoke(GetDdosProfileTemplateInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetDdosProfileTemplateResult> getDdosProfileTemplate(GetDdosProfileTemplateArgs args, InvokeOptions options)
public static Output<GetDdosProfileTemplateResult> getDdosProfileTemplate(GetDdosProfileTemplateArgs args, InvokeOptions options)
fn::invoke:
function: gcore:index/getDdosProfileTemplate:getDdosProfileTemplate
arguments:
# arguments dictionary
The following arguments are supported:
- Id string
- The ID of this resource.
- Name string
- Template name
- Project
Id double - Project
Name string - Region
Id double - Region
Name string - Template
Id double - Template id
- Id string
- The ID of this resource.
- Name string
- Template name
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string - Template
Id float64 - Template id
- id String
- The ID of this resource.
- name String
- Template name
- project
Id Double - project
Name String - region
Id Double - region
Name String - template
Id Double - Template id
- id string
- The ID of this resource.
- name string
- Template name
- project
Id number - project
Name string - region
Id number - region
Name string - template
Id number - Template id
- id str
- The ID of this resource.
- name str
- Template name
- project_
id float - project_
name str - region_
id float - region_
name str - template_
id float - Template id
- id String
- The ID of this resource.
- name String
- Template name
- project
Id Number - project
Name String - region
Id Number - region
Name String - template
Id Number - Template id
getDdosProfileTemplate Result
The following output properties are available:
- Description string
- Template description
- Fields
List<Get
Ddos Profile Template Field> - Additional fields
- Id string
- The ID of this resource.
- Name string
- Template name
- Template
Id double - Template id
- Project
Id double - Project
Name string - Region
Id double - Region
Name string
- Description string
- Template description
- Fields
[]Get
Ddos Profile Template Field - Additional fields
- Id string
- The ID of this resource.
- Name string
- Template name
- Template
Id float64 - Template id
- Project
Id float64 - Project
Name string - Region
Id float64 - Region
Name string
- description String
- Template description
- fields
List<Get
Ddos Profile Template Field> - Additional fields
- id String
- The ID of this resource.
- name String
- Template name
- template
Id Double - Template id
- project
Id Double - project
Name String - region
Id Double - region
Name String
- description string
- Template description
- fields
Get
Ddos Profile Template Field[] - Additional fields
- id string
- The ID of this resource.
- name string
- Template name
- template
Id number - Template id
- project
Id number - project
Name string - region
Id number - region
Name string
- description str
- Template description
- fields
Sequence[Get
Ddos Profile Template Field] - Additional fields
- id str
- The ID of this resource.
- name str
- Template name
- template_
id float - Template id
- project_
id float - project_
name str - region_
id float - region_
name str
- description String
- Template description
- fields List<Property Map>
- Additional fields
- id String
- The ID of this resource.
- name String
- Template name
- template
Id Number - Template id
- project
Id Number - project
Name String - region
Id Number - region
Name String
Supporting Types
GetDdosProfileTemplateField
- Default string
- Description string
- Field
Type string - Id double
- Name string
- Required bool
- Validation
Schema string
- Default string
- Description string
- Field
Type string - Id float64
- Name string
- Required bool
- Validation
Schema string
- default_ String
- description String
- field
Type String - id Double
- name String
- required Boolean
- validation
Schema String
- default string
- description string
- field
Type string - id number
- name string
- required boolean
- validation
Schema string
- default str
- description str
- field_
type str - id float
- name str
- required bool
- validation_
schema str
- default String
- description String
- field
Type String - id Number
- name String
- required Boolean
- validation
Schema String
Package Details
- Repository
- gcore g-core/terraform-provider-gcore
- License
- Notes
- This Pulumi package is based on the
gcore
Terraform Provider.