1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. securitycenter
  5. SourceIamPolicy
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.securitycenter.SourceIamPolicy

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

    A Cloud Security Command Center’s (Cloud SCC) finding source. A finding source is an entity or a mechanism that can produce a finding. A source is like a container of findings that come from the same scanner, logger, monitor, etc.

    To get more information about Source, see:

    Example Usage

    Scc Source Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const customSource = new gcp.securitycenter.Source("custom_source", {
        displayName: "My Source",
        organization: "123456789",
        description: "My custom Cloud Security Command Center Finding Source",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    custom_source = gcp.securitycenter.Source("custom_source",
        display_name="My Source",
        organization="123456789",
        description="My custom Cloud Security Command Center Finding Source")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/securitycenter"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := securitycenter.NewSource(ctx, "custom_source", &securitycenter.SourceArgs{
    			DisplayName:  pulumi.String("My Source"),
    			Organization: pulumi.String("123456789"),
    			Description:  pulumi.String("My custom Cloud Security Command Center Finding Source"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var customSource = new Gcp.SecurityCenter.Source("custom_source", new()
        {
            DisplayName = "My Source",
            Organization = "123456789",
            Description = "My custom Cloud Security Command Center Finding Source",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.securitycenter.Source;
    import com.pulumi.gcp.securitycenter.SourceArgs;
    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 customSource = new Source("customSource", SourceArgs.builder()        
                .displayName("My Source")
                .organization("123456789")
                .description("My custom Cloud Security Command Center Finding Source")
                .build());
    
        }
    }
    
    resources:
      customSource:
        type: gcp:securitycenter:Source
        name: custom_source
        properties:
          displayName: My Source
          organization: '123456789'
          description: My custom Cloud Security Command Center Finding Source
    

    Create SourceIamPolicy Resource

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

    Constructor syntax

    new SourceIamPolicy(name: string, args: SourceIamPolicyArgs, opts?: CustomResourceOptions);
    @overload
    def SourceIamPolicy(resource_name: str,
                        args: SourceIamPolicyArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def SourceIamPolicy(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        organization: Optional[str] = None,
                        policy_data: Optional[str] = None,
                        source: Optional[str] = None)
    func NewSourceIamPolicy(ctx *Context, name string, args SourceIamPolicyArgs, opts ...ResourceOption) (*SourceIamPolicy, error)
    public SourceIamPolicy(string name, SourceIamPolicyArgs args, CustomResourceOptions? opts = null)
    public SourceIamPolicy(String name, SourceIamPolicyArgs args)
    public SourceIamPolicy(String name, SourceIamPolicyArgs args, CustomResourceOptions options)
    
    type: gcp:securitycenter:SourceIamPolicy
    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 SourceIamPolicyArgs
    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 SourceIamPolicyArgs
    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 SourceIamPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SourceIamPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SourceIamPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var sourceIamPolicyResource = new Gcp.SecurityCenter.SourceIamPolicy("sourceIamPolicyResource", new()
    {
        Organization = "string",
        PolicyData = "string",
        Source = "string",
    });
    
    example, err := securitycenter.NewSourceIamPolicy(ctx, "sourceIamPolicyResource", &securitycenter.SourceIamPolicyArgs{
    	Organization: pulumi.String("string"),
    	PolicyData:   pulumi.String("string"),
    	Source:       pulumi.String("string"),
    })
    
    var sourceIamPolicyResource = new SourceIamPolicy("sourceIamPolicyResource", SourceIamPolicyArgs.builder()        
        .organization("string")
        .policyData("string")
        .source("string")
        .build());
    
    source_iam_policy_resource = gcp.securitycenter.SourceIamPolicy("sourceIamPolicyResource",
        organization="string",
        policy_data="string",
        source="string")
    
    const sourceIamPolicyResource = new gcp.securitycenter.SourceIamPolicy("sourceIamPolicyResource", {
        organization: "string",
        policyData: "string",
        source: "string",
    });
    
    type: gcp:securitycenter:SourceIamPolicy
    properties:
        organization: string
        policyData: string
        source: string
    

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

    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    PolicyData string
    Source string
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    PolicyData string
    Source string
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    policyData String
    source String
    organization string
    The organization whose Cloud Security Command Center the Source lives in.


    policyData string
    source string
    organization str
    The organization whose Cloud Security Command Center the Source lives in.


    policy_data str
    source str
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    policyData String
    source String

    Outputs

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

    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    Etag string
    Id string
    The provider-assigned unique ID for this managed resource.
    etag String
    id String
    The provider-assigned unique ID for this managed resource.
    etag string
    id string
    The provider-assigned unique ID for this managed resource.
    etag str
    id str
    The provider-assigned unique ID for this managed resource.
    etag String
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing SourceIamPolicy Resource

    Get an existing SourceIamPolicy 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?: SourceIamPolicyState, opts?: CustomResourceOptions): SourceIamPolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            etag: Optional[str] = None,
            organization: Optional[str] = None,
            policy_data: Optional[str] = None,
            source: Optional[str] = None) -> SourceIamPolicy
    func GetSourceIamPolicy(ctx *Context, name string, id IDInput, state *SourceIamPolicyState, opts ...ResourceOption) (*SourceIamPolicy, error)
    public static SourceIamPolicy Get(string name, Input<string> id, SourceIamPolicyState? state, CustomResourceOptions? opts = null)
    public static SourceIamPolicy get(String name, Output<String> id, SourceIamPolicyState 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:
    Etag string
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    PolicyData string
    Source string
    Etag string
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    PolicyData string
    Source string
    etag String
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    policyData String
    source String
    etag string
    organization string
    The organization whose Cloud Security Command Center the Source lives in.


    policyData string
    source string
    etag str
    organization str
    The organization whose Cloud Security Command Center the Source lives in.


    policy_data str
    source str
    etag String
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    policyData String
    source String

    Import

    Source can be imported using any of these accepted formats:

    • organizations/{{organization}}/sources/{{name}}

    • {{organization}}/{{name}}

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

    $ pulumi import gcp:securitycenter/sourceIamPolicy:SourceIamPolicy default organizations/{{organization}}/sources/{{name}}
    
    $ pulumi import gcp:securitycenter/sourceIamPolicy:SourceIamPolicy default {{organization}}/{{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.20.0 published on Wednesday, Apr 24, 2024 by Pulumi