1. Packages
  2. Cloudflare Provider
  3. API Docs
  4. getApiShield
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

cloudflare.getApiShield

Explore with Pulumi AI

cloudflare logo
Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleApiShield = cloudflare.getApiShield({
        zoneId: "023e105f4ecef8ad9ca31a8372d0c353",
        properties: ["auth_id_characteristics"],
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_api_shield = cloudflare.get_api_shield(zone_id="023e105f4ecef8ad9ca31a8372d0c353",
        properties=["auth_id_characteristics"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-cloudflare/sdk/v6/go/cloudflare"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudflare.LookupApiShield(ctx, &cloudflare.LookupApiShieldArgs{
    			ZoneId: "023e105f4ecef8ad9ca31a8372d0c353",
    			Properties: []string{
    				"auth_id_characteristics",
    			},
    		}, nil)
    		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 exampleApiShield = Cloudflare.GetApiShield.Invoke(new()
        {
            ZoneId = "023e105f4ecef8ad9ca31a8372d0c353",
            Properties = new[]
            {
                "auth_id_characteristics",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.cloudflare.CloudflareFunctions;
    import com.pulumi.cloudflare.inputs.GetApiShieldArgs;
    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 exampleApiShield = CloudflareFunctions.getApiShield(GetApiShieldArgs.builder()
                .zoneId("023e105f4ecef8ad9ca31a8372d0c353")
                .properties("auth_id_characteristics")
                .build());
    
        }
    }
    
    variables:
      exampleApiShield:
        fn::invoke:
          function: cloudflare:getApiShield
          arguments:
            zoneId: 023e105f4ecef8ad9ca31a8372d0c353
            properties:
              - auth_id_characteristics
    

    Using getApiShield

    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 getApiShield(args: GetApiShieldArgs, opts?: InvokeOptions): Promise<GetApiShieldResult>
    function getApiShieldOutput(args: GetApiShieldOutputArgs, opts?: InvokeOptions): Output<GetApiShieldResult>
    def get_api_shield(properties: Optional[Sequence[str]] = None,
                       zone_id: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetApiShieldResult
    def get_api_shield_output(properties: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                       zone_id: Optional[pulumi.Input[str]] = None,
                       opts: Optional[InvokeOptions] = None) -> Output[GetApiShieldResult]
    func LookupApiShield(ctx *Context, args *LookupApiShieldArgs, opts ...InvokeOption) (*LookupApiShieldResult, error)
    func LookupApiShieldOutput(ctx *Context, args *LookupApiShieldOutputArgs, opts ...InvokeOption) LookupApiShieldResultOutput

    > Note: This function is named LookupApiShield in the Go SDK.

    public static class GetApiShield 
    {
        public static Task<GetApiShieldResult> InvokeAsync(GetApiShieldArgs args, InvokeOptions? opts = null)
        public static Output<GetApiShieldResult> Invoke(GetApiShieldInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetApiShieldResult> getApiShield(GetApiShieldArgs args, InvokeOptions options)
    public static Output<GetApiShieldResult> getApiShield(GetApiShieldArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getApiShield:getApiShield
      arguments:
        # arguments dictionary

    The following arguments are supported:

    ZoneId string
    Identifier
    Properties List<string>
    Requests information about certain properties.
    ZoneId string
    Identifier
    Properties []string
    Requests information about certain properties.
    zoneId String
    Identifier
    properties List<String>
    Requests information about certain properties.
    zoneId string
    Identifier
    properties string[]
    Requests information about certain properties.
    zone_id str
    Identifier
    properties Sequence[str]
    Requests information about certain properties.
    zoneId String
    Identifier
    properties List<String>
    Requests information about certain properties.

    getApiShield Result

    The following output properties are available:

    AuthIdCharacteristics List<GetApiShieldAuthIdCharacteristic>
    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneId string
    Identifier
    Properties List<string>
    Requests information about certain properties.
    AuthIdCharacteristics []GetApiShieldAuthIdCharacteristic
    Id string
    The provider-assigned unique ID for this managed resource.
    ZoneId string
    Identifier
    Properties []string
    Requests information about certain properties.
    authIdCharacteristics List<GetApiShieldAuthIdCharacteristic>
    id String
    The provider-assigned unique ID for this managed resource.
    zoneId String
    Identifier
    properties List<String>
    Requests information about certain properties.
    authIdCharacteristics GetApiShieldAuthIdCharacteristic[]
    id string
    The provider-assigned unique ID for this managed resource.
    zoneId string
    Identifier
    properties string[]
    Requests information about certain properties.
    auth_id_characteristics Sequence[GetApiShieldAuthIdCharacteristic]
    id str
    The provider-assigned unique ID for this managed resource.
    zone_id str
    Identifier
    properties Sequence[str]
    Requests information about certain properties.
    authIdCharacteristics List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    zoneId String
    Identifier
    properties List<String>
    Requests information about certain properties.

    Supporting Types

    GetApiShieldAuthIdCharacteristic

    Name string
    The name of the characteristic field, i.e., the header or cookie name.
    Type string
    The type of characteristic. Available values: "header", "cookie".
    Name string
    The name of the characteristic field, i.e., the header or cookie name.
    Type string
    The type of characteristic. Available values: "header", "cookie".
    name String
    The name of the characteristic field, i.e., the header or cookie name.
    type String
    The type of characteristic. Available values: "header", "cookie".
    name string
    The name of the characteristic field, i.e., the header or cookie name.
    type string
    The type of characteristic. Available values: "header", "cookie".
    name str
    The name of the characteristic field, i.e., the header or cookie name.
    type str
    The type of characteristic. Available values: "header", "cookie".
    name String
    The name of the characteristic field, i.e., the header or cookie name.
    type String
    The type of characteristic. Available values: "header", "cookie".

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Cloudflare v6.1.2 published on Monday, Apr 28, 2025 by Pulumi