1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. securitycenter
  5. SourceIamBinding
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 2024 by Pulumi

gcp.securitycenter.SourceIamBinding

Explore with Pulumi AI

gcp logo
Google Cloud Classic v8.9.3 published on Monday, Nov 18, 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/v8/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 SourceIamBinding Resource

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

    Constructor syntax

    new SourceIamBinding(name: string, args: SourceIamBindingArgs, opts?: CustomResourceOptions);
    @overload
    def SourceIamBinding(resource_name: str,
                         args: SourceIamBindingArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def SourceIamBinding(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         members: Optional[Sequence[str]] = None,
                         organization: Optional[str] = None,
                         role: Optional[str] = None,
                         source: Optional[str] = None,
                         condition: Optional[SourceIamBindingConditionArgs] = None)
    func NewSourceIamBinding(ctx *Context, name string, args SourceIamBindingArgs, opts ...ResourceOption) (*SourceIamBinding, error)
    public SourceIamBinding(string name, SourceIamBindingArgs args, CustomResourceOptions? opts = null)
    public SourceIamBinding(String name, SourceIamBindingArgs args)
    public SourceIamBinding(String name, SourceIamBindingArgs args, CustomResourceOptions options)
    
    type: gcp:securitycenter:SourceIamBinding
    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 SourceIamBindingArgs
    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 SourceIamBindingArgs
    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 SourceIamBindingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SourceIamBindingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SourceIamBindingArgs
    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 sourceIamBindingResource = new Gcp.SecurityCenter.SourceIamBinding("sourceIamBindingResource", new()
    {
        Members = new[]
        {
            "string",
        },
        Organization = "string",
        Role = "string",
        Source = "string",
        Condition = new Gcp.SecurityCenter.Inputs.SourceIamBindingConditionArgs
        {
            Expression = "string",
            Title = "string",
            Description = "string",
        },
    });
    
    example, err := securitycenter.NewSourceIamBinding(ctx, "sourceIamBindingResource", &securitycenter.SourceIamBindingArgs{
    	Members: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Organization: pulumi.String("string"),
    	Role:         pulumi.String("string"),
    	Source:       pulumi.String("string"),
    	Condition: &securitycenter.SourceIamBindingConditionArgs{
    		Expression:  pulumi.String("string"),
    		Title:       pulumi.String("string"),
    		Description: pulumi.String("string"),
    	},
    })
    
    var sourceIamBindingResource = new SourceIamBinding("sourceIamBindingResource", SourceIamBindingArgs.builder()
        .members("string")
        .organization("string")
        .role("string")
        .source("string")
        .condition(SourceIamBindingConditionArgs.builder()
            .expression("string")
            .title("string")
            .description("string")
            .build())
        .build());
    
    source_iam_binding_resource = gcp.securitycenter.SourceIamBinding("sourceIamBindingResource",
        members=["string"],
        organization="string",
        role="string",
        source="string",
        condition={
            "expression": "string",
            "title": "string",
            "description": "string",
        })
    
    const sourceIamBindingResource = new gcp.securitycenter.SourceIamBinding("sourceIamBindingResource", {
        members: ["string"],
        organization: "string",
        role: "string",
        source: "string",
        condition: {
            expression: "string",
            title: "string",
            description: "string",
        },
    });
    
    type: gcp:securitycenter:SourceIamBinding
    properties:
        condition:
            description: string
            expression: string
            title: string
        members:
            - string
        organization: string
        role: string
        source: string
    

    SourceIamBinding Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The SourceIamBinding resource accepts the following input properties:

    Members List<string>
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    Role string
    Source string
    Condition SourceIamBindingCondition
    Members []string
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    Role string
    Source string
    Condition SourceIamBindingConditionArgs
    members List<String>
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    role String
    source String
    condition SourceIamBindingCondition
    members string[]
    organization string
    The organization whose Cloud Security Command Center the Source lives in.


    role string
    source string
    condition SourceIamBindingCondition
    members Sequence[str]
    organization str
    The organization whose Cloud Security Command Center the Source lives in.


    role str
    source str
    condition SourceIamBindingConditionArgs
    members List<String>
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    role String
    source String
    condition Property Map

    Outputs

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

    Get an existing SourceIamBinding 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?: SourceIamBindingState, opts?: CustomResourceOptions): SourceIamBinding
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            condition: Optional[SourceIamBindingConditionArgs] = None,
            etag: Optional[str] = None,
            members: Optional[Sequence[str]] = None,
            organization: Optional[str] = None,
            role: Optional[str] = None,
            source: Optional[str] = None) -> SourceIamBinding
    func GetSourceIamBinding(ctx *Context, name string, id IDInput, state *SourceIamBindingState, opts ...ResourceOption) (*SourceIamBinding, error)
    public static SourceIamBinding Get(string name, Input<string> id, SourceIamBindingState? state, CustomResourceOptions? opts = null)
    public static SourceIamBinding get(String name, Output<String> id, SourceIamBindingState 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:
    Condition SourceIamBindingCondition
    Etag string
    Members List<string>
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    Role string
    Source string
    Condition SourceIamBindingConditionArgs
    Etag string
    Members []string
    Organization string
    The organization whose Cloud Security Command Center the Source lives in.


    Role string
    Source string
    condition SourceIamBindingCondition
    etag String
    members List<String>
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    role String
    source String
    condition SourceIamBindingCondition
    etag string
    members string[]
    organization string
    The organization whose Cloud Security Command Center the Source lives in.


    role string
    source string
    condition SourceIamBindingConditionArgs
    etag str
    members Sequence[str]
    organization str
    The organization whose Cloud Security Command Center the Source lives in.


    role str
    source str
    condition Property Map
    etag String
    members List<String>
    organization String
    The organization whose Cloud Security Command Center the Source lives in.


    role String
    source String

    Supporting Types

    SourceIamBindingCondition, SourceIamBindingConditionArgs

    Expression string
    Title string
    Description string
    The description of the source (max of 1024 characters).
    Expression string
    Title string
    Description string
    The description of the source (max of 1024 characters).
    expression String
    title String
    description String
    The description of the source (max of 1024 characters).
    expression string
    title string
    description string
    The description of the source (max of 1024 characters).
    expression str
    title str
    description str
    The description of the source (max of 1024 characters).
    expression String
    title String
    description String
    The description of the source (max of 1024 characters).

    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/sourceIamBinding:SourceIamBinding default organizations/{{organization}}/sources/{{name}}
    
    $ pulumi import gcp:securitycenter/sourceIamBinding:SourceIamBinding 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 v8.9.3 published on Monday, Nov 18, 2024 by Pulumi