com.pulumi.cloudflare.kotlin.ApiShieldOperationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin
import com.pulumi.cloudflare.ApiShieldOperationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Provides a resource to manage an operation in API Shield Endpoint Management.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as cloudflare from "@pulumi/cloudflare";
* const example = new cloudflare.ApiShieldOperation("example", {
* zoneId: "0da42c8d2132a9ddaf714f9e7c920711",
* method: "GET",
* host: "api.example.com",
* endpoint: "/path",
* });
* ```
* ```python
* import pulumi
* import pulumi_cloudflare as cloudflare
* example = cloudflare.ApiShieldOperation("example",
* zone_id="0da42c8d2132a9ddaf714f9e7c920711",
* method="GET",
* host="api.example.com",
* endpoint="/path")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Cloudflare = Pulumi.Cloudflare;
* return await Deployment.RunAsync(() =>
* {
* var example = new Cloudflare.ApiShieldOperation("example", new()
* {
* ZoneId = "0da42c8d2132a9ddaf714f9e7c920711",
* Method = "GET",
* Host = "api.example.com",
* Endpoint = "/path",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-cloudflare/sdk/v5/go/cloudflare"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := cloudflare.NewApiShieldOperation(ctx, "example", &cloudflare.ApiShieldOperationArgs{
* ZoneId: pulumi.String("0da42c8d2132a9ddaf714f9e7c920711"),
* Method: pulumi.String("GET"),
* Host: pulumi.String("api.example.com"),
* Endpoint: pulumi.String("/path"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* package generated_program;
* import com.pulumi.Context;
* import com.pulumi.Pulumi;
* import com.pulumi.core.Output;
* import com.pulumi.cloudflare.ApiShieldOperation;
* import com.pulumi.cloudflare.ApiShieldOperationArgs;
* 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) {
* var example = new ApiShieldOperation("example", ApiShieldOperationArgs.builder()
* .zoneId("0da42c8d2132a9ddaf714f9e7c920711")
* .method("GET")
* .host("api.example.com")
* .endpoint("/path")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: cloudflare:ApiShieldOperation
* properties:
* zoneId: 0da42c8d2132a9ddaf714f9e7c920711
* method: GET
* host: api.example.com
* endpoint: /path
* ```
*
* @property endpoint The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with `{varN}`, starting with `{var1}`. This will then be [Cloudflare-normalized](https://developers.cloudflare.com/rules/normalization/how-it-works/). **Modifying this attribute will force creation of a new resource.**
* @property host RFC3986-compliant host. **Modifying this attribute will force creation of a new resource.**
* @property method The HTTP method used to access the endpoint. **Modifying this attribute will force creation of a new resource.**
* @property zoneId The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
public data class ApiShieldOperationArgs(
public val endpoint: Output? = null,
public val host: Output? = null,
public val method: Output? = null,
public val zoneId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.ApiShieldOperationArgs =
com.pulumi.cloudflare.ApiShieldOperationArgs.builder()
.endpoint(endpoint?.applyValue({ args0 -> args0 }))
.host(host?.applyValue({ args0 -> args0 }))
.method(method?.applyValue({ args0 -> args0 }))
.zoneId(zoneId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ApiShieldOperationArgs].
*/
@PulumiTagMarker
public class ApiShieldOperationArgsBuilder internal constructor() {
private var endpoint: Output? = null
private var host: Output? = null
private var method: Output? = null
private var zoneId: Output? = null
/**
* @param value The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with `{varN}`, starting with `{var1}`. This will then be [Cloudflare-normalized](https://developers.cloudflare.com/rules/normalization/how-it-works/). **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("kadvxudbtyyxofgd")
public suspend fun endpoint(`value`: Output) {
this.endpoint = value
}
/**
* @param value RFC3986-compliant host. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("feeubulxjyeaaeks")
public suspend fun host(`value`: Output) {
this.host = value
}
/**
* @param value The HTTP method used to access the endpoint. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("nycnfqapqfxyvhfe")
public suspend fun method(`value`: Output) {
this.method = value
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("ptqmenhxwdpknfga")
public suspend fun zoneId(`value`: Output) {
this.zoneId = value
}
/**
* @param value The endpoint which can contain path parameter templates in curly braces, each will be replaced from left to right with `{varN}`, starting with `{var1}`. This will then be [Cloudflare-normalized](https://developers.cloudflare.com/rules/normalization/how-it-works/). **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("dgpprfwjlbdixtgx")
public suspend fun endpoint(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.endpoint = mapped
}
/**
* @param value RFC3986-compliant host. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("jcvhmdvgkedietnl")
public suspend fun host(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.host = mapped
}
/**
* @param value The HTTP method used to access the endpoint. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("jwwtyjjygfgdhmcm")
public suspend fun method(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.method = mapped
}
/**
* @param value The zone identifier to target for the resource. **Modifying this attribute will force creation of a new resource.**
*/
@JvmName("vhrellqjcfvfbleo")
public suspend fun zoneId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.zoneId = mapped
}
internal fun build(): ApiShieldOperationArgs = ApiShieldOperationArgs(
endpoint = endpoint,
host = host,
method = method,
zoneId = zoneId,
)
}