1. Packages
  2. Packages
  3. Cloudflare Provider
  4. API Docs
  5. getShareResources
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 exampleShareResources = cloudflare.getShareResources({
        accountId: "023e105f4ecef8ad9ca31a8372d0c353",
        shareId: "3fd85f74b32742f1bff64a85009dda07",
        resourceType: "custom-ruleset",
        status: "active",
    });
    
    import pulumi
    import pulumi_cloudflare as cloudflare
    
    example_share_resources = cloudflare.get_share_resources(account_id="023e105f4ecef8ad9ca31a8372d0c353",
        share_id="3fd85f74b32742f1bff64a85009dda07",
        resource_type="custom-ruleset",
        status="active")
    
    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.GetShareResources(ctx, &cloudflare.LookupShareResourcesArgs{
    			AccountId:    "023e105f4ecef8ad9ca31a8372d0c353",
    			ShareId:      "3fd85f74b32742f1bff64a85009dda07",
    			ResourceType: pulumi.StringRef("custom-ruleset"),
    			Status:       pulumi.StringRef("active"),
    		}, 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 exampleShareResources = Cloudflare.GetShareResources.Invoke(new()
        {
            AccountId = "023e105f4ecef8ad9ca31a8372d0c353",
            ShareId = "3fd85f74b32742f1bff64a85009dda07",
            ResourceType = "custom-ruleset",
            Status = "active",
        });
    
    });
    
    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.GetShareResourcesArgs;
    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 exampleShareResources = CloudflareFunctions.getShareResources(GetShareResourcesArgs.builder()
                .accountId("023e105f4ecef8ad9ca31a8372d0c353")
                .shareId("3fd85f74b32742f1bff64a85009dda07")
                .resourceType("custom-ruleset")
                .status("active")
                .build());
    
        }
    }
    
    variables:
      exampleShareResources:
        fn::invoke:
          function: cloudflare:getShareResources
          arguments:
            accountId: 023e105f4ecef8ad9ca31a8372d0c353
            shareId: 3fd85f74b32742f1bff64a85009dda07
            resourceType: custom-ruleset
            status: active
    
    pulumi {
      required_providers {
        cloudflare = {
          source = "pulumi/cloudflare"
        }
      }
    }
    
    data "cloudflare_getshareresources" "exampleShareResources" {
      account_id    = "023e105f4ecef8ad9ca31a8372d0c353"
      share_id      = "3fd85f74b32742f1bff64a85009dda07"
      resource_type = "custom-ruleset"
      status        = "active"
    }
    

    Using getShareResources

    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 getShareResources(args: GetShareResourcesArgs, opts?: InvokeOptions): Promise<GetShareResourcesResult>
    function getShareResourcesOutput(args: GetShareResourcesOutputArgs, opts?: InvokeOptions): Output<GetShareResourcesResult>
    def get_share_resources(account_id: Optional[str] = None,
                            max_items: Optional[int] = None,
                            resource_type: Optional[str] = None,
                            share_id: Optional[str] = None,
                            status: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetShareResourcesResult
    def get_share_resources_output(account_id: pulumi.Input[Optional[str]] = None,
                            max_items: pulumi.Input[Optional[int]] = None,
                            resource_type: pulumi.Input[Optional[str]] = None,
                            share_id: pulumi.Input[Optional[str]] = None,
                            status: pulumi.Input[Optional[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetShareResourcesResult]
    func LookupShareResources(ctx *Context, args *LookupShareResourcesArgs, opts ...InvokeOption) (*LookupShareResourcesResult, error)
    func LookupShareResourcesOutput(ctx *Context, args *LookupShareResourcesOutputArgs, opts ...InvokeOption) LookupShareResourcesResultOutput

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

    public static class GetShareResources 
    {
        public static Task<GetShareResourcesResult> InvokeAsync(GetShareResourcesArgs args, InvokeOptions? opts = null)
        public static Output<GetShareResourcesResult> Invoke(GetShareResourcesInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetShareResourcesResult> getShareResources(GetShareResourcesArgs args, InvokeOptions options)
    public static Output<GetShareResourcesResult> getShareResources(GetShareResourcesArgs args, InvokeOptions options)
    
    fn::invoke:
      function: cloudflare:index/getShareResources:getShareResources
      arguments:
        # arguments dictionary
    data "cloudflare_get_share_resources" "name" {
        # arguments
    }

    The following arguments are supported:

    AccountId string
    Account identifier.
    ShareId string
    Share identifier tag.
    MaxItems int
    Max items to fetch, default: 1000
    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".
    AccountId string
    Account identifier.
    ShareId string
    Share identifier tag.
    MaxItems int
    Max items to fetch, default: 1000
    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".
    account_id string
    Account identifier.
    share_id string
    Share identifier tag.
    max_items number
    Max items to fetch, default: 1000
    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".
    accountId String
    Account identifier.
    shareId String
    Share identifier tag.
    maxItems Integer
    Max items to fetch, default: 1000
    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".
    accountId string
    Account identifier.
    shareId string
    Share identifier tag.
    maxItems number
    Max items to fetch, default: 1000
    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".
    account_id str
    Account identifier.
    share_id str
    Share identifier tag.
    max_items int
    Max items to fetch, default: 1000
    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".
    accountId String
    Account identifier.
    shareId String
    Share identifier tag.
    maxItems Number
    Max items to fetch, default: 1000
    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".

    getShareResources Result

    The following output properties are available:

    AccountId string
    Account identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results List<GetShareResourcesResult>
    The items returned by the data source
    ShareId string
    Share identifier tag.
    MaxItems int
    Max items to fetch, default: 1000
    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".
    AccountId string
    Account identifier.
    Id string
    The provider-assigned unique ID for this managed resource.
    Results []GetShareResourcesResult
    The items returned by the data source
    ShareId string
    Share identifier tag.
    MaxItems int
    Max items to fetch, default: 1000
    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".
    account_id string
    Account identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    results list(object)
    The items returned by the data source
    share_id string
    Share identifier tag.
    max_items number
    Max items to fetch, default: 1000
    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".
    accountId String
    Account identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<GetShareResourcesResult>
    The items returned by the data source
    shareId String
    Share identifier tag.
    maxItems Integer
    Max items to fetch, default: 1000
    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".
    accountId string
    Account identifier.
    id string
    The provider-assigned unique ID for this managed resource.
    results GetShareResourcesResult[]
    The items returned by the data source
    shareId string
    Share identifier tag.
    maxItems number
    Max items to fetch, default: 1000
    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".
    account_id str
    Account identifier.
    id str
    The provider-assigned unique ID for this managed resource.
    results Sequence[GetShareResourcesResult]
    The items returned by the data source
    share_id str
    Share identifier tag.
    max_items int
    Max items to fetch, default: 1000
    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".
    accountId String
    Account identifier.
    id String
    The provider-assigned unique ID for this managed resource.
    results List<Property Map>
    The items returned by the data source
    shareId String
    Share identifier tag.
    maxItems Number
    Max items to fetch, default: 1000
    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".

    Supporting Types

    GetShareResourcesResult

    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.
    Status string
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    Status string
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    status string
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    status String
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    status string
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    status str
    Resource Status. Available values: "active", "deleting", "deleted".
    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.
    status String
    Resource 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