1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Waas
  5. PurgeCache
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

oci.Waas.PurgeCache

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi

    This resource provides the Purge Cache resource in Oracle Cloud Infrastructure Web Application Acceleration and Security service.

    Performs a purge of the cache for each specified resource. If no resources are passed, the cache for the entire Web Application Firewall will be purged. For more information, see Caching Rules.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testPurgeCache = new oci.waas.PurgeCache("test_purge_cache", {
        waasPolicyId: testWaasPolicy.id,
        resources: purgeCacheResources,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_purge_cache = oci.waas.PurgeCache("test_purge_cache",
        waas_policy_id=test_waas_policy["id"],
        resources=purge_cache_resources)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Waas"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Waas.NewPurgeCache(ctx, "test_purge_cache", &Waas.PurgeCacheArgs{
    			WaasPolicyId: pulumi.Any(testWaasPolicy.Id),
    			Resources:    pulumi.Any(purgeCacheResources),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testPurgeCache = new Oci.Waas.PurgeCache("test_purge_cache", new()
        {
            WaasPolicyId = testWaasPolicy.Id,
            Resources = purgeCacheResources,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Waas.PurgeCache;
    import com.pulumi.oci.Waas.PurgeCacheArgs;
    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 testPurgeCache = new PurgeCache("testPurgeCache", PurgeCacheArgs.builder()
                .waasPolicyId(testWaasPolicy.id())
                .resources(purgeCacheResources)
                .build());
    
        }
    }
    
    resources:
      testPurgeCache:
        type: oci:Waas:PurgeCache
        name: test_purge_cache
        properties:
          waasPolicyId: ${testWaasPolicy.id}
          resources: ${purgeCacheResources}
    

    Create PurgeCache Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new PurgeCache(name: string, args: PurgeCacheArgs, opts?: CustomResourceOptions);
    @overload
    def PurgeCache(resource_name: str,
                   args: PurgeCacheArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def PurgeCache(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   waas_policy_id: Optional[str] = None,
                   resources: Optional[Sequence[str]] = None)
    func NewPurgeCache(ctx *Context, name string, args PurgeCacheArgs, opts ...ResourceOption) (*PurgeCache, error)
    public PurgeCache(string name, PurgeCacheArgs args, CustomResourceOptions? opts = null)
    public PurgeCache(String name, PurgeCacheArgs args)
    public PurgeCache(String name, PurgeCacheArgs args, CustomResourceOptions options)
    
    type: oci:Waas:PurgeCache
    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 PurgeCacheArgs
    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 PurgeCacheArgs
    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 PurgeCacheArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PurgeCacheArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PurgeCacheArgs
    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 purgeCacheResource = new Oci.Waas.PurgeCache("purgeCacheResource", new()
    {
        WaasPolicyId = "string",
        Resources = new[]
        {
            "string",
        },
    });
    
    example, err := Waas.NewPurgeCache(ctx, "purgeCacheResource", &Waas.PurgeCacheArgs{
    	WaasPolicyId: pulumi.String("string"),
    	Resources: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var purgeCacheResource = new PurgeCache("purgeCacheResource", PurgeCacheArgs.builder()
        .waasPolicyId("string")
        .resources("string")
        .build());
    
    purge_cache_resource = oci.waas.PurgeCache("purgeCacheResource",
        waas_policy_id="string",
        resources=["string"])
    
    const purgeCacheResource = new oci.waas.PurgeCache("purgeCacheResource", {
        waasPolicyId: "string",
        resources: ["string"],
    });
    
    type: oci:Waas:PurgeCache
    properties:
        resources:
            - string
        waasPolicyId: string
    

    PurgeCache 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 PurgeCache resource accepts the following input properties:

    WaasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Resources List<string>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    WaasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Resources []string
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId String

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources List<String>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources string[]
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waas_policy_id str

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources Sequence[str]
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId String

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources List<String>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).

    Outputs

    All input properties are implicitly available as output properties. Additionally, the PurgeCache 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 PurgeCache Resource

    Get an existing PurgeCache 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?: PurgeCacheState, opts?: CustomResourceOptions): PurgeCache
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            resources: Optional[Sequence[str]] = None,
            waas_policy_id: Optional[str] = None) -> PurgeCache
    func GetPurgeCache(ctx *Context, name string, id IDInput, state *PurgeCacheState, opts ...ResourceOption) (*PurgeCache, error)
    public static PurgeCache Get(string name, Input<string> id, PurgeCacheState? state, CustomResourceOptions? opts = null)
    public static PurgeCache get(String name, Output<String> id, PurgeCacheState 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.
    The following state arguments are supported:
    Resources List<string>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    WaasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Resources []string
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    WaasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources List<String>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId String

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources string[]
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId string

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources Sequence[str]
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waas_policy_id str

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    resources List<String>
    A resource to purge, specified by either a hostless absolute path starting with a single slash (Example: /path/to/resource) or by a relative path in which the first component will be interpreted as a domain protected by the WAAS policy (Example: example.com/path/to/resource).
    waasPolicyId String

    The OCID of the WAAS policy.

    ** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

    Import

    Import is not supported for this resource.

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v1.41.0 published on Wednesday, Jun 19, 2024 by Pulumi