gcp.securitycenter.Source
Explore with Pulumi AI
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:
- API documentation
- How-to Guides
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 Source Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Source(name: string, args: SourceArgs, opts?: CustomResourceOptions);
@overload
def Source(resource_name: str,
args: SourceArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Source(resource_name: str,
opts: Optional[ResourceOptions] = None,
display_name: Optional[str] = None,
organization: Optional[str] = None,
description: Optional[str] = None)
func NewSource(ctx *Context, name string, args SourceArgs, opts ...ResourceOption) (*Source, error)
public Source(string name, SourceArgs args, CustomResourceOptions? opts = null)
public Source(String name, SourceArgs args)
public Source(String name, SourceArgs args, CustomResourceOptions options)
type: gcp:securitycenter:Source
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 SourceArgs
- 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 SourceArgs
- 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 SourceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SourceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SourceArgs
- 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 sourceResource = new Gcp.SecurityCenter.Source("sourceResource", new()
{
DisplayName = "string",
Organization = "string",
Description = "string",
});
example, err := securitycenter.NewSource(ctx, "sourceResource", &securitycenter.SourceArgs{
DisplayName: pulumi.String("string"),
Organization: pulumi.String("string"),
Description: pulumi.String("string"),
})
var sourceResource = new Source("sourceResource", SourceArgs.builder()
.displayName("string")
.organization("string")
.description("string")
.build());
source_resource = gcp.securitycenter.Source("sourceResource",
display_name="string",
organization="string",
description="string")
const sourceResource = new gcp.securitycenter.Source("sourceResource", {
displayName: "string",
organization: "string",
description: "string",
});
type: gcp:securitycenter:Source
properties:
description: string
displayName: string
organization: string
Source 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 Source resource accepts the following input properties:
- Display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- Organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- Description string
- The description of the source (max of 1024 characters).
- Display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- Organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- Description string
- The description of the source (max of 1024 characters).
- display
Name String - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- organization String
- The organization whose Cloud Security Command Center the Source
lives in.
- description String
- The description of the source (max of 1024 characters).
- display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- description string
- The description of the source (max of 1024 characters).
- display_
name str - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- organization str
- The organization whose Cloud Security Command Center the Source
lives in.
- description str
- The description of the source (max of 1024 characters).
- display
Name String - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- organization String
- The organization whose Cloud Security Command Center the Source
lives in.
- description String
- The description of the source (max of 1024 characters).
Outputs
All input properties are implicitly available as output properties. Additionally, the Source resource produces the following output properties:
Look up Existing Source Resource
Get an existing Source 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?: SourceState, opts?: CustomResourceOptions): Source
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
name: Optional[str] = None,
organization: Optional[str] = None) -> Source
func GetSource(ctx *Context, name string, id IDInput, state *SourceState, opts ...ResourceOption) (*Source, error)
public static Source Get(string name, Input<string> id, SourceState? state, CustomResourceOptions? opts = null)
public static Source get(String name, Output<String> id, SourceState 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.
- Description string
- The description of the source (max of 1024 characters).
- Display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- Name string
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - Organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- Description string
- The description of the source (max of 1024 characters).
- Display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- Name string
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - Organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- description String
- The description of the source (max of 1024 characters).
- display
Name String - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- name String
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - organization String
- The organization whose Cloud Security Command Center the Source
lives in.
- description string
- The description of the source (max of 1024 characters).
- display
Name string - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- name string
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - organization string
- The organization whose Cloud Security Command Center the Source
lives in.
- description str
- The description of the source (max of 1024 characters).
- display_
name str - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- name str
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - organization str
- The organization whose Cloud Security Command Center the Source
lives in.
- description String
- The description of the source (max of 1024 characters).
- display
Name String - The source’s display name. A source’s display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must start and end with a letter or digit, may contain letters, digits, spaces, hyphens, and underscores, and can be no longer than 32 characters.
- name String
- The resource name of this source, in the format
organizations/{{organization}}/sources/{{source}}
. - organization String
- The organization whose Cloud Security Command Center the Source
lives in.
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/source:Source default organizations/{{organization}}/sources/{{name}}
$ pulumi import gcp:securitycenter/source:Source 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.