cloudflare.ApiShieldOperation
Explore with Pulumi AI
Provides a resource to manage an operation in API Shield Endpoint Management.
Example Usage
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",
});
import pulumi
import pulumi_cloudflare as cloudflare
example = cloudflare.ApiShieldOperation("example",
zone_id="0da42c8d2132a9ddaf714f9e7c920711",
method="GET",
host="api.example.com",
endpoint="/path")
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
})
}
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",
});
});
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());
}
}
resources:
example:
type: cloudflare:ApiShieldOperation
properties:
zoneId: 0da42c8d2132a9ddaf714f9e7c920711
method: GET
host: api.example.com
endpoint: /path
Create ApiShieldOperation Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ApiShieldOperation(name: string, args: ApiShieldOperationArgs, opts?: CustomResourceOptions);
@overload
def ApiShieldOperation(resource_name: str,
args: ApiShieldOperationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ApiShieldOperation(resource_name: str,
opts: Optional[ResourceOptions] = None,
endpoint: Optional[str] = None,
host: Optional[str] = None,
method: Optional[str] = None,
zone_id: Optional[str] = None)
func NewApiShieldOperation(ctx *Context, name string, args ApiShieldOperationArgs, opts ...ResourceOption) (*ApiShieldOperation, error)
public ApiShieldOperation(string name, ApiShieldOperationArgs args, CustomResourceOptions? opts = null)
public ApiShieldOperation(String name, ApiShieldOperationArgs args)
public ApiShieldOperation(String name, ApiShieldOperationArgs args, CustomResourceOptions options)
type: cloudflare:ApiShieldOperation
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ApiShieldOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ApiShieldOperationArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ApiShieldOperationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ApiShieldOperationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ApiShieldOperationArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var apiShieldOperationResource = new Cloudflare.ApiShieldOperation("apiShieldOperationResource", new()
{
Endpoint = "string",
Host = "string",
Method = "string",
ZoneId = "string",
});
example, err := cloudflare.NewApiShieldOperation(ctx, "apiShieldOperationResource", &cloudflare.ApiShieldOperationArgs{
Endpoint: pulumi.String("string"),
Host: pulumi.String("string"),
Method: pulumi.String("string"),
ZoneId: pulumi.String("string"),
})
var apiShieldOperationResource = new ApiShieldOperation("apiShieldOperationResource", ApiShieldOperationArgs.builder()
.endpoint("string")
.host("string")
.method("string")
.zoneId("string")
.build());
api_shield_operation_resource = cloudflare.ApiShieldOperation("apiShieldOperationResource",
endpoint="string",
host="string",
method="string",
zone_id="string")
const apiShieldOperationResource = new cloudflare.ApiShieldOperation("apiShieldOperationResource", {
endpoint: "string",
host: "string",
method: "string",
zoneId: "string",
});
type: cloudflare:ApiShieldOperation
properties:
endpoint: string
host: string
method: string
zoneId: string
ApiShieldOperation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The ApiShieldOperation resource accepts the following input properties:
- Endpoint string
- 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. Modifying this attribute will force creation of a new resource. - Host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- Method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Endpoint string
- 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. Modifying this attribute will force creation of a new resource. - Host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- Method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint String
- 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. Modifying this attribute will force creation of a new resource. - host String
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method String
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint string
- 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. Modifying this attribute will force creation of a new resource. - host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint str
- 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. Modifying this attribute will force creation of a new resource. - host str
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method str
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone_
id str - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint String
- 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. Modifying this attribute will force creation of a new resource. - host String
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method String
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the ApiShieldOperation resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ApiShieldOperation Resource
Get an existing ApiShieldOperation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ApiShieldOperationState, opts?: CustomResourceOptions): ApiShieldOperation
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
endpoint: Optional[str] = None,
host: Optional[str] = None,
method: Optional[str] = None,
zone_id: Optional[str] = None) -> ApiShieldOperation
func GetApiShieldOperation(ctx *Context, name string, id IDInput, state *ApiShieldOperationState, opts ...ResourceOption) (*ApiShieldOperation, error)
public static ApiShieldOperation Get(string name, Input<string> id, ApiShieldOperationState? state, CustomResourceOptions? opts = null)
public static ApiShieldOperation get(String name, Output<String> id, ApiShieldOperationState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Endpoint string
- 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. Modifying this attribute will force creation of a new resource. - Host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- Method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- Endpoint string
- 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. Modifying this attribute will force creation of a new resource. - Host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- Method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- Zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint String
- 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. Modifying this attribute will force creation of a new resource. - host String
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method String
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint string
- 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. Modifying this attribute will force creation of a new resource. - host string
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method string
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id string - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint str
- 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. Modifying this attribute will force creation of a new resource. - host str
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method str
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone_
id str - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
- endpoint String
- 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. Modifying this attribute will force creation of a new resource. - host String
- RFC3986-compliant host. Modifying this attribute will force creation of a new resource.
- method String
- The HTTP method used to access the endpoint. Modifying this attribute will force creation of a new resource.
- zone
Id String - The zone identifier to target for the resource. Modifying this attribute will force creation of a new resource.
Package Details
- Repository
- Cloudflare pulumi/pulumi-cloudflare
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
cloudflare
Terraform Provider.