1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. cloudasset
  5. OrganizationFeed
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.cloudasset.OrganizationFeed

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    Describes a Cloud Asset Inventory feed used to to listen to asset updates.

    To get more information about OrganizationFeed, see:

    Example Usage

    Cloud Asset Organization Feed

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    // The topic where the resource change notifications will be sent.
    const feedOutput = new gcp.pubsub.Topic("feed_output", {
        project: "my-project-name",
        name: "network-updates",
    });
    // Create a feed that sends notifications about network resource updates under a
    // particular organization.
    const organizationFeed = new gcp.cloudasset.OrganizationFeed("organization_feed", {
        billingProject: "my-project-name",
        orgId: "123456789",
        feedId: "network-updates",
        contentType: "RESOURCE",
        assetTypes: [
            "compute.googleapis.com/Subnetwork",
            "compute.googleapis.com/Network",
        ],
        feedOutputConfig: {
            pubsubDestination: {
                topic: feedOutput.id,
            },
        },
        condition: {
            expression: `!temporal_asset.deleted &&
    temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST
    `,
            title: "created",
            description: "Send notifications on creation events",
        },
    });
    // Find the project number of the project whose identity will be used for sending
    // the asset change notifications.
    const project = gcp.organizations.getProject({
        projectId: "my-project-name",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    # The topic where the resource change notifications will be sent.
    feed_output = gcp.pubsub.Topic("feed_output",
        project="my-project-name",
        name="network-updates")
    # Create a feed that sends notifications about network resource updates under a
    # particular organization.
    organization_feed = gcp.cloudasset.OrganizationFeed("organization_feed",
        billing_project="my-project-name",
        org_id="123456789",
        feed_id="network-updates",
        content_type="RESOURCE",
        asset_types=[
            "compute.googleapis.com/Subnetwork",
            "compute.googleapis.com/Network",
        ],
        feed_output_config=gcp.cloudasset.OrganizationFeedFeedOutputConfigArgs(
            pubsub_destination=gcp.cloudasset.OrganizationFeedFeedOutputConfigPubsubDestinationArgs(
                topic=feed_output.id,
            ),
        ),
        condition=gcp.cloudasset.OrganizationFeedConditionArgs(
            expression="""!temporal_asset.deleted &&
    temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST
    """,
            title="created",
            description="Send notifications on creation events",
        ))
    # Find the project number of the project whose identity will be used for sending
    # the asset change notifications.
    project = gcp.organizations.get_project(project_id="my-project-name")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudasset"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/organizations"
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/pubsub"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// The topic where the resource change notifications will be sent.
    		feedOutput, err := pubsub.NewTopic(ctx, "feed_output", &pubsub.TopicArgs{
    			Project: pulumi.String("my-project-name"),
    			Name:    pulumi.String("network-updates"),
    		})
    		if err != nil {
    			return err
    		}
    		// Create a feed that sends notifications about network resource updates under a
    		// particular organization.
    		_, err = cloudasset.NewOrganizationFeed(ctx, "organization_feed", &cloudasset.OrganizationFeedArgs{
    			BillingProject: pulumi.String("my-project-name"),
    			OrgId:          pulumi.String("123456789"),
    			FeedId:         pulumi.String("network-updates"),
    			ContentType:    pulumi.String("RESOURCE"),
    			AssetTypes: pulumi.StringArray{
    				pulumi.String("compute.googleapis.com/Subnetwork"),
    				pulumi.String("compute.googleapis.com/Network"),
    			},
    			FeedOutputConfig: &cloudasset.OrganizationFeedFeedOutputConfigArgs{
    				PubsubDestination: &cloudasset.OrganizationFeedFeedOutputConfigPubsubDestinationArgs{
    					Topic: feedOutput.ID(),
    				},
    			},
    			Condition: &cloudasset.OrganizationFeedConditionArgs{
    				Expression:  pulumi.String("!temporal_asset.deleted &&\ntemporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST\n"),
    				Title:       pulumi.String("created"),
    				Description: pulumi.String("Send notifications on creation events"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// Find the project number of the project whose identity will be used for sending
    		// the asset change notifications.
    		_, err = organizations.LookupProject(ctx, &organizations.LookupProjectArgs{
    			ProjectId: pulumi.StringRef("my-project-name"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        // The topic where the resource change notifications will be sent.
        var feedOutput = new Gcp.PubSub.Topic("feed_output", new()
        {
            Project = "my-project-name",
            Name = "network-updates",
        });
    
        // Create a feed that sends notifications about network resource updates under a
        // particular organization.
        var organizationFeed = new Gcp.CloudAsset.OrganizationFeed("organization_feed", new()
        {
            BillingProject = "my-project-name",
            OrgId = "123456789",
            FeedId = "network-updates",
            ContentType = "RESOURCE",
            AssetTypes = new[]
            {
                "compute.googleapis.com/Subnetwork",
                "compute.googleapis.com/Network",
            },
            FeedOutputConfig = new Gcp.CloudAsset.Inputs.OrganizationFeedFeedOutputConfigArgs
            {
                PubsubDestination = new Gcp.CloudAsset.Inputs.OrganizationFeedFeedOutputConfigPubsubDestinationArgs
                {
                    Topic = feedOutput.Id,
                },
            },
            Condition = new Gcp.CloudAsset.Inputs.OrganizationFeedConditionArgs
            {
                Expression = @"!temporal_asset.deleted &&
    temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST
    ",
                Title = "created",
                Description = "Send notifications on creation events",
            },
        });
    
        // Find the project number of the project whose identity will be used for sending
        // the asset change notifications.
        var project = Gcp.Organizations.GetProject.Invoke(new()
        {
            ProjectId = "my-project-name",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.pubsub.Topic;
    import com.pulumi.gcp.pubsub.TopicArgs;
    import com.pulumi.gcp.cloudasset.OrganizationFeed;
    import com.pulumi.gcp.cloudasset.OrganizationFeedArgs;
    import com.pulumi.gcp.cloudasset.inputs.OrganizationFeedFeedOutputConfigArgs;
    import com.pulumi.gcp.cloudasset.inputs.OrganizationFeedFeedOutputConfigPubsubDestinationArgs;
    import com.pulumi.gcp.cloudasset.inputs.OrganizationFeedConditionArgs;
    import com.pulumi.gcp.organizations.OrganizationsFunctions;
    import com.pulumi.gcp.organizations.inputs.GetProjectArgs;
    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) {
            // The topic where the resource change notifications will be sent.
            var feedOutput = new Topic("feedOutput", TopicArgs.builder()
                .project("my-project-name")
                .name("network-updates")
                .build());
    
            // Create a feed that sends notifications about network resource updates under a
            // particular organization.
            var organizationFeed = new OrganizationFeed("organizationFeed", OrganizationFeedArgs.builder()
                .billingProject("my-project-name")
                .orgId("123456789")
                .feedId("network-updates")
                .contentType("RESOURCE")
                .assetTypes(            
                    "compute.googleapis.com/Subnetwork",
                    "compute.googleapis.com/Network")
                .feedOutputConfig(OrganizationFeedFeedOutputConfigArgs.builder()
                    .pubsubDestination(OrganizationFeedFeedOutputConfigPubsubDestinationArgs.builder()
                        .topic(feedOutput.id())
                        .build())
                    .build())
                .condition(OrganizationFeedConditionArgs.builder()
                    .expression("""
    !temporal_asset.deleted &&
    temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST
                    """)
                    .title("created")
                    .description("Send notifications on creation events")
                    .build())
                .build());
    
            // Find the project number of the project whose identity will be used for sending
            // the asset change notifications.
            final var project = OrganizationsFunctions.getProject(GetProjectArgs.builder()
                .projectId("my-project-name")
                .build());
    
        }
    }
    
    resources:
      # Create a feed that sends notifications about network resource updates under a
      # particular organization.
      organizationFeed:
        type: gcp:cloudasset:OrganizationFeed
        name: organization_feed
        properties:
          billingProject: my-project-name
          orgId: '123456789'
          feedId: network-updates
          contentType: RESOURCE
          assetTypes:
            - compute.googleapis.com/Subnetwork
            - compute.googleapis.com/Network
          feedOutputConfig:
            pubsubDestination:
              topic: ${feedOutput.id}
          condition:
            expression: |
              !temporal_asset.deleted &&
              temporal_asset.prior_asset_state == google.cloud.asset.v1.TemporalAsset.PriorAssetState.DOES_NOT_EXIST          
            title: created
            description: Send notifications on creation events
      # The topic where the resource change notifications will be sent.
      feedOutput:
        type: gcp:pubsub:Topic
        name: feed_output
        properties:
          project: my-project-name
          name: network-updates
    variables:
      # Find the project number of the project whose identity will be used for sending
      # the asset change notifications.
      project:
        fn::invoke:
          Function: gcp:organizations:getProject
          Arguments:
            projectId: my-project-name
    

    Create OrganizationFeed Resource

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

    Constructor syntax

    new OrganizationFeed(name: string, args: OrganizationFeedArgs, opts?: CustomResourceOptions);
    @overload
    def OrganizationFeed(resource_name: str,
                         args: OrganizationFeedArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def OrganizationFeed(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         billing_project: Optional[str] = None,
                         feed_id: Optional[str] = None,
                         feed_output_config: Optional[OrganizationFeedFeedOutputConfigArgs] = None,
                         org_id: Optional[str] = None,
                         asset_names: Optional[Sequence[str]] = None,
                         asset_types: Optional[Sequence[str]] = None,
                         condition: Optional[OrganizationFeedConditionArgs] = None,
                         content_type: Optional[str] = None)
    func NewOrganizationFeed(ctx *Context, name string, args OrganizationFeedArgs, opts ...ResourceOption) (*OrganizationFeed, error)
    public OrganizationFeed(string name, OrganizationFeedArgs args, CustomResourceOptions? opts = null)
    public OrganizationFeed(String name, OrganizationFeedArgs args)
    public OrganizationFeed(String name, OrganizationFeedArgs args, CustomResourceOptions options)
    
    type: gcp:cloudasset:OrganizationFeed
    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 OrganizationFeedArgs
    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 OrganizationFeedArgs
    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 OrganizationFeedArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args OrganizationFeedArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args OrganizationFeedArgs
    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 organizationFeedResource = new Gcp.CloudAsset.OrganizationFeed("organizationFeedResource", new()
    {
        BillingProject = "string",
        FeedId = "string",
        FeedOutputConfig = new Gcp.CloudAsset.Inputs.OrganizationFeedFeedOutputConfigArgs
        {
            PubsubDestination = new Gcp.CloudAsset.Inputs.OrganizationFeedFeedOutputConfigPubsubDestinationArgs
            {
                Topic = "string",
            },
        },
        OrgId = "string",
        AssetNames = new[]
        {
            "string",
        },
        AssetTypes = new[]
        {
            "string",
        },
        Condition = new Gcp.CloudAsset.Inputs.OrganizationFeedConditionArgs
        {
            Expression = "string",
            Description = "string",
            Location = "string",
            Title = "string",
        },
        ContentType = "string",
    });
    
    example, err := cloudasset.NewOrganizationFeed(ctx, "organizationFeedResource", &cloudasset.OrganizationFeedArgs{
    	BillingProject: pulumi.String("string"),
    	FeedId:         pulumi.String("string"),
    	FeedOutputConfig: &cloudasset.OrganizationFeedFeedOutputConfigArgs{
    		PubsubDestination: &cloudasset.OrganizationFeedFeedOutputConfigPubsubDestinationArgs{
    			Topic: pulumi.String("string"),
    		},
    	},
    	OrgId: pulumi.String("string"),
    	AssetNames: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	AssetTypes: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Condition: &cloudasset.OrganizationFeedConditionArgs{
    		Expression:  pulumi.String("string"),
    		Description: pulumi.String("string"),
    		Location:    pulumi.String("string"),
    		Title:       pulumi.String("string"),
    	},
    	ContentType: pulumi.String("string"),
    })
    
    var organizationFeedResource = new OrganizationFeed("organizationFeedResource", OrganizationFeedArgs.builder()
        .billingProject("string")
        .feedId("string")
        .feedOutputConfig(OrganizationFeedFeedOutputConfigArgs.builder()
            .pubsubDestination(OrganizationFeedFeedOutputConfigPubsubDestinationArgs.builder()
                .topic("string")
                .build())
            .build())
        .orgId("string")
        .assetNames("string")
        .assetTypes("string")
        .condition(OrganizationFeedConditionArgs.builder()
            .expression("string")
            .description("string")
            .location("string")
            .title("string")
            .build())
        .contentType("string")
        .build());
    
    organization_feed_resource = gcp.cloudasset.OrganizationFeed("organizationFeedResource",
        billing_project="string",
        feed_id="string",
        feed_output_config=gcp.cloudasset.OrganizationFeedFeedOutputConfigArgs(
            pubsub_destination=gcp.cloudasset.OrganizationFeedFeedOutputConfigPubsubDestinationArgs(
                topic="string",
            ),
        ),
        org_id="string",
        asset_names=["string"],
        asset_types=["string"],
        condition=gcp.cloudasset.OrganizationFeedConditionArgs(
            expression="string",
            description="string",
            location="string",
            title="string",
        ),
        content_type="string")
    
    const organizationFeedResource = new gcp.cloudasset.OrganizationFeed("organizationFeedResource", {
        billingProject: "string",
        feedId: "string",
        feedOutputConfig: {
            pubsubDestination: {
                topic: "string",
            },
        },
        orgId: "string",
        assetNames: ["string"],
        assetTypes: ["string"],
        condition: {
            expression: "string",
            description: "string",
            location: "string",
            title: "string",
        },
        contentType: "string",
    });
    
    type: gcp:cloudasset:OrganizationFeed
    properties:
        assetNames:
            - string
        assetTypes:
            - string
        billingProject: string
        condition:
            description: string
            expression: string
            location: string
            title: string
        contentType: string
        feedId: string
        feedOutputConfig:
            pubsubDestination:
                topic: string
        orgId: string
    

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

    BillingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    FeedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    FeedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    OrgId string
    The organization this feed should be created in.
    AssetNames List<string>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    AssetTypes List<string>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    Condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    ContentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    BillingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    FeedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    FeedOutputConfig OrganizationFeedFeedOutputConfigArgs
    Output configuration for asset feed destination. Structure is documented below.
    OrgId string
    The organization this feed should be created in.
    AssetNames []string
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    AssetTypes []string
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    Condition OrganizationFeedConditionArgs
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    ContentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    billingProject String
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    feedId String
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    orgId String
    The organization this feed should be created in.
    assetNames List<String>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes List<String>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType String
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    billingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    feedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    orgId string
    The organization this feed should be created in.
    assetNames string[]
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes string[]
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    billing_project str
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    feed_id str
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feed_output_config OrganizationFeedFeedOutputConfigArgs
    Output configuration for asset feed destination. Structure is documented below.
    org_id str
    The organization this feed should be created in.
    asset_names Sequence[str]
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    asset_types Sequence[str]
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    condition OrganizationFeedConditionArgs
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    content_type str
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    billingProject String
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    feedId String
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig Property Map
    Output configuration for asset feed destination. Structure is documented below.
    orgId String
    The organization this feed should be created in.
    assetNames List<String>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes List<String>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    condition Property Map
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType String
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]

    Outputs

    All input properties are implicitly available as output properties. Additionally, the OrganizationFeed resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.

    Look up Existing OrganizationFeed Resource

    Get an existing OrganizationFeed 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?: OrganizationFeedState, opts?: CustomResourceOptions): OrganizationFeed
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            asset_names: Optional[Sequence[str]] = None,
            asset_types: Optional[Sequence[str]] = None,
            billing_project: Optional[str] = None,
            condition: Optional[OrganizationFeedConditionArgs] = None,
            content_type: Optional[str] = None,
            feed_id: Optional[str] = None,
            feed_output_config: Optional[OrganizationFeedFeedOutputConfigArgs] = None,
            name: Optional[str] = None,
            org_id: Optional[str] = None) -> OrganizationFeed
    func GetOrganizationFeed(ctx *Context, name string, id IDInput, state *OrganizationFeedState, opts ...ResourceOption) (*OrganizationFeed, error)
    public static OrganizationFeed Get(string name, Input<string> id, OrganizationFeedState? state, CustomResourceOptions? opts = null)
    public static OrganizationFeed get(String name, Output<String> id, OrganizationFeedState 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:
    AssetNames List<string>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    AssetTypes List<string>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    BillingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    Condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    ContentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    FeedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    FeedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    Name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    OrgId string
    The organization this feed should be created in.
    AssetNames []string
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    AssetTypes []string
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    BillingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    Condition OrganizationFeedConditionArgs
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    ContentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    FeedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    FeedOutputConfig OrganizationFeedFeedOutputConfigArgs
    Output configuration for asset feed destination. Structure is documented below.
    Name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    OrgId string
    The organization this feed should be created in.
    assetNames List<String>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes List<String>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    billingProject String
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType String
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    feedId String
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    name String
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    orgId String
    The organization this feed should be created in.
    assetNames string[]
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes string[]
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    billingProject string
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    condition OrganizationFeedCondition
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType string
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    feedId string
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig OrganizationFeedFeedOutputConfig
    Output configuration for asset feed destination. Structure is documented below.
    name string
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    orgId string
    The organization this feed should be created in.
    asset_names Sequence[str]
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    asset_types Sequence[str]
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    billing_project str
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    condition OrganizationFeedConditionArgs
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    content_type str
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    feed_id str
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feed_output_config OrganizationFeedFeedOutputConfigArgs
    Output configuration for asset feed destination. Structure is documented below.
    name str
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    org_id str
    The organization this feed should be created in.
    assetNames List<String>
    A list of the full names of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: //compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1. See https://cloud.google.com/apis/design/resourceNames#fullResourceName for more info.
    assetTypes List<String>
    A list of types of the assets to receive updates. You must specify either or both of assetNames and assetTypes. Only asset updates matching specified assetNames and assetTypes are exported to the feed. For example: "compute.googleapis.com/Disk" See https://cloud.google.com/asset-inventory/docs/supported-asset-types for a list of all supported asset types.
    billingProject String
    The project whose identity will be used when sending messages to the destination pubsub topic. It also specifies the project for API enablement check, quota, and billing.
    condition Property Map
    A condition which determines whether an asset update should be published. If specified, an asset will be returned only when the expression evaluates to true. When set, expression field must be a valid CEL expression on a TemporalAsset with name temporal_asset. Example: a Feed with expression "temporal_asset.deleted == true" will only publish Asset deletions. Other fields of condition are optional.
    contentType String
    Asset content type. If not specified, no content but the asset name and type will be returned. Possible values: ["CONTENT_TYPE_UNSPECIFIED", "RESOURCE", "IAM_POLICY", "ORG_POLICY", "OS_INVENTORY", "ACCESS_POLICY"]
    feedId String
    This is the client-assigned asset feed identifier and it needs to be unique under a specific parent.
    feedOutputConfig Property Map
    Output configuration for asset feed destination. Structure is documented below.
    name String
    The format will be organizations/{organization_number}/feeds/{client-assigned_feed_identifier}.
    orgId String
    The organization this feed should be created in.

    Supporting Types

    OrganizationFeedCondition, OrganizationFeedConditionArgs

    Expression string
    Textual representation of an expression in Common Expression Language syntax.
    Description string
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    Location string
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    Title string
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
    Expression string
    Textual representation of an expression in Common Expression Language syntax.
    Description string
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    Location string
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    Title string
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
    expression String
    Textual representation of an expression in Common Expression Language syntax.
    description String
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    location String
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    title String
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
    expression string
    Textual representation of an expression in Common Expression Language syntax.
    description string
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    location string
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    title string
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
    expression str
    Textual representation of an expression in Common Expression Language syntax.
    description str
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    location str
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    title str
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
    expression String
    Textual representation of an expression in Common Expression Language syntax.
    description String
    Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
    location String
    String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
    title String
    Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.

    OrganizationFeedFeedOutputConfig, OrganizationFeedFeedOutputConfigArgs

    PubsubDestination OrganizationFeedFeedOutputConfigPubsubDestination
    Destination on Cloud Pubsub. Structure is documented below.
    PubsubDestination OrganizationFeedFeedOutputConfigPubsubDestination
    Destination on Cloud Pubsub. Structure is documented below.
    pubsubDestination OrganizationFeedFeedOutputConfigPubsubDestination
    Destination on Cloud Pubsub. Structure is documented below.
    pubsubDestination OrganizationFeedFeedOutputConfigPubsubDestination
    Destination on Cloud Pubsub. Structure is documented below.
    pubsub_destination OrganizationFeedFeedOutputConfigPubsubDestination
    Destination on Cloud Pubsub. Structure is documented below.
    pubsubDestination Property Map
    Destination on Cloud Pubsub. Structure is documented below.

    OrganizationFeedFeedOutputConfigPubsubDestination, OrganizationFeedFeedOutputConfigPubsubDestinationArgs

    Topic string
    Destination on Cloud Pubsub topic.


    Topic string
    Destination on Cloud Pubsub topic.


    topic String
    Destination on Cloud Pubsub topic.


    topic string
    Destination on Cloud Pubsub topic.


    topic str
    Destination on Cloud Pubsub topic.


    topic String
    Destination on Cloud Pubsub topic.


    Import

    OrganizationFeed can be imported using any of these accepted formats:

    • organizations/{{org_id}}/feeds/{{name}}

    • {{org_id}}/{{name}}

    When using the pulumi import command, OrganizationFeed can be imported using one of the formats above. For example:

    $ pulumi import gcp:cloudasset/organizationFeed:OrganizationFeed default organizations/{{org_id}}/feeds/{{name}}
    
    $ pulumi import gcp:cloudasset/organizationFeed:OrganizationFeed default {{org_id}}/{{name}}
    

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

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi