1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getShareResource
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi
cloudflare logo
Viewing docs for Cloudflare v6.18.0
published on Thursday, Jul 16, 2026 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as cloudflare from "@pulumi/cloudflare";
    
    const exampleShareResource = cloudflare.getShareResource({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        shareId: "3fd85f74b32742f1bff64a85009dda07",
        shareResourceId: "023e105f4ecef8ad9ca31a8372d0c353",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_share_resource = cloudflare.get_share_resource(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        share_id="3fd85f74b32742f1bff64a85009dda07",
        share_resource_id="023e105f4ecef8ad9ca31a8372d0c353")
    
    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.GetShareResource(ctx, &cloudflare.LookupShareResourceArgs{
    			AccountId:       "023e105f4ecef8ad9ca31a8372d0c353",
    			ShareId:         "3fd85f74b32742f1bff64a85009dda07",
    			ShareResourceId: pulumi.StringRef("023e105f4ecef8ad9ca31a8372d0c353"),
    		}, 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 exampleShareResource = Cloudflare.GetShareResource.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            ShareId = "3fd85f74b32742f1bff64a85009dda07",
            ShareResourceId = "023e105f4ecef8ad9ca31a8372d0c353",
        });
    
    });
    
    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.GetShareResourceArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 exampleShareResource = CloudflareFunctions.getShareResource(GetShareResourceArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .shareId("3fd85f74b32742f1bff64a85009dda07")
                .shareResourceId("023e105f4ecef8ad9ca31a8372d0c353")
                .build());
    
        }
    }
    
    variables:
      exampleShareResource:
        fn::invoke:
          function: cloudflare:getShareResource
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            shareId: 3fd85f74b32742f1bff64a85009dda07
            shareResourceId: 023e105f4ecef8ad9ca31a8372d0c353
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_getshareresource" "exampleShareResource" {
      account_id        = "023e105f4ecef8ad9ca31a8372d0c353"
      share_id          = "3fd85f74b32742f1bff64a85009dda07"
      share_resource_id = "023e105f4ecef8ad9ca31a8372d0c353"
    }
    

    Using getShareResource

    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 getShareResource(args: GetShareResourceArgs, opts?: InvokeOptions): Promise<GetShareResourceResult>
    function getShareResourceOutput(args: GetShareResourceOutputArgs, opts?: InvokeOptions): Output<GetShareResourceResult>
    def get_share_resource(account_id: Optional[str] = None,
                           filter: Optional[GetShareResourceFilter] = None,
                           share_id: Optional[str] = None,
                           share_resource_id: Optional[str] = None,
                           opts: Optional[InvokeOptions] = None) -> GetShareResourceResult
    def get_share_resource_output(account_id: pulumi.Input[Optional[str]] = None,
                           filter: pulumi.Input[Optional[GetShareResourceFilterArgs]] = None,
                           share_id: pulumi.Input[Optional[str]] = None,
                           share_resource_id: pulumi.Input[Optional[str]] = None,
                           opts: Optional[InvokeOptions] = None) -> Output[GetShareResourceResult]
    func LookupShareResource(ctx *Context, args *LookupShareResourceArgs, opts ...InvokeOption) (*LookupShareResourceResult, error)
    func LookupShareResourceOutput(ctx *Context, args *LookupShareResourceOutputArgs, opts ...InvokeOption) LookupShareResourceResultOutput

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

    public static class GetShareResource 
    {
        public static Task<GetShareResourceResult> InvokeAsync(GetShareResourceArgs args, InvokeOptions? opts = null)
        public static Output<GetShareResourceResult> Invoke(GetShareResourceInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetShareResourceResult> getShareResource(GetShareResourceArgs args, InvokeOptions options)
    public static Output<GetShareResourceResult> getShareResource(GetShareResourceArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getShareResource:getShareResource
      arguments:
        # arguments dictionary
    data "cloudflare_get_share_resource" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Account identifier.
    ShareId string
    Share identifier tag.
    Filter GetShareResourceFilter
    ShareResourceId string
    Share Resource identifier.
    AccountId string
    Account identifier.
    ShareId string
    Share identifier tag.
    Filter GetShareResourceFilter
    ShareResourceId string
    Share Resource identifier.
    account_id string
    Account identifier.
    share_id string
    Share identifier tag.
    filter object
    share_resource_id string
    Share Resource identifier.
    accountId String
    Account identifier.
    shareId String
    Share identifier tag.
    filter GetShareResourceFilter
    shareResourceId String
    Share Resource identifier.
    accountId string
    Account identifier.
    shareId string
    Share identifier tag.
    filter GetShareResourceFilter
    shareResourceId string
    Share Resource identifier.
    account_id str
    Account identifier.
    share_id str
    Share identifier tag.
    filter GetShareResourceFilter
    share_resource_id str
    Share Resource identifier.
    accountId String
    Account identifier.
    shareId String
    Share identifier tag.
    filter Property Map
    shareResourceId String
    Share Resource identifier.

    getShareResource Result

    The following output properties are available:

    AccountId string
    Account identifier.
    Created string
    When the share was created.
    Id string
    Share Resource identifier.
    Meta string
    Resource Metadata.
    Modified string
    When the share was modified.
    ResourceAccountId string
    Account identifier.
    ResourceId string
    Share Resource identifier.
    ResourceType string
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    ResourceVersion int
    Resource Version.
    ShareId string
    Share identifier tag.
    Status string
    Resource Status. Available values: "active", "deleting", "deleted".
    Filter GetShareResourceFilter
    ShareResourceId string
    Share Resource identifier.
    AccountId string
    Account identifier.
    Created string
    When the share was created.
    Id string
    Share Resource identifier.
    Meta string
    Resource Metadata.
    Modified string
    When the share was modified.
    ResourceAccountId string
    Account identifier.
    ResourceId string
    Share Resource identifier.
    ResourceType string
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    ResourceVersion int
    Resource Version.
    ShareId string
    Share identifier tag.
    Status string
    Resource Status. Available values: "active", "deleting", "deleted".
    Filter GetShareResourceFilter
    ShareResourceId string
    Share Resource identifier.
    account_id string
    Account identifier.
    created string
    When the share was created.
    id string
    Share Resource identifier.
    meta string
    Resource Metadata.
    modified string
    When the share was modified.
    resource_account_id string
    Account identifier.
    resource_id string
    Share Resource identifier.
    resource_type string
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    resource_version number
    Resource Version.
    share_id string
    Share identifier tag.
    status string
    Resource Status. Available values: "active", "deleting", "deleted".
    filter object
    share_resource_id string
    Share Resource identifier.
    accountId String
    Account identifier.
    created String
    When the share was created.
    id String
    Share Resource identifier.
    meta String
    Resource Metadata.
    modified String
    When the share was modified.
    resourceAccountId String
    Account identifier.
    resourceId String
    Share Resource identifier.
    resourceType String
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    resourceVersion Integer
    Resource Version.
    shareId String
    Share identifier tag.
    status String
    Resource Status. Available values: "active", "deleting", "deleted".
    filter GetShareResourceFilter
    shareResourceId String
    Share Resource identifier.
    accountId string
    Account identifier.
    created string
    When the share was created.
    id string
    Share Resource identifier.
    meta string
    Resource Metadata.
    modified string
    When the share was modified.
    resourceAccountId string
    Account identifier.
    resourceId string
    Share Resource identifier.
    resourceType string
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    resourceVersion number
    Resource Version.
    shareId string
    Share identifier tag.
    status string
    Resource Status. Available values: "active", "deleting", "deleted".
    filter GetShareResourceFilter
    shareResourceId string
    Share Resource identifier.
    account_id str
    Account identifier.
    created str
    When the share was created.
    id str
    Share Resource identifier.
    meta str
    Resource Metadata.
    modified str
    When the share was modified.
    resource_account_id str
    Account identifier.
    resource_id str
    Share Resource identifier.
    resource_type str
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    resource_version int
    Resource Version.
    share_id str
    Share identifier tag.
    status str
    Resource Status. Available values: "active", "deleting", "deleted".
    filter GetShareResourceFilter
    share_resource_id str
    Share Resource identifier.
    accountId String
    Account identifier.
    created String
    When the share was created.
    id String
    Share Resource identifier.
    meta String
    Resource Metadata.
    modified String
    When the share was modified.
    resourceAccountId String
    Account identifier.
    resourceId String
    Share Resource identifier.
    resourceType String
    Resource Type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    resourceVersion Number
    Resource Version.
    shareId String
    Share identifier tag.
    status String
    Resource Status. Available values: "active", "deleting", "deleted".
    filter Property Map
    shareResourceId String
    Share Resource identifier.

    Supporting Types

    GetShareResourceFilter

    ResourceType string
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    Status string
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    ResourceType string
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    Status string
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    resource_type string
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    status string
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    resourceType String
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    status String
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    resourceType string
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    status string
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    resource_type str
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    status str
    Filter share resources by status. Available values: "active", "deleting", "deleted".
    resourceType String
    Filter share resources by resource_type. Available values: "custom-ruleset", "gateway-policy", "gateway-destination-ip", "gateway-block-page-settings", "gateway-extended-email-matching", "idp-federation-grant".
    status String
    Filter share resources by status. Available values: "active", "deleting", "deleted".

    Package Details

    Repository
    Cloudflare pulumi/pulumi-cloudflare
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the cloudflare Terraform Provider.
    cloudflare logo
    Viewing docs for Cloudflare v6.18.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial