Package com.pulumi.gcp.compute
Class SecurityScanConfig
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.gcp.compute.SecurityScanConfig
-
public class SecurityScanConfig extends com.pulumi.resources.CustomResource
A ScanConfig resource contains the configurations to launch a scan. To get more information about ScanConfig, see: * [API documentation](https://cloud.google.com/security-scanner/docs/reference/rest/v1beta/projects.scanConfigs) * How-to Guides * [Using Cloud Security Scanner](https://cloud.google.com/security-scanner/docs/scanning) > **Warning:** All arguments including `authentication.google_account.password` and `authentication.custom_account.password` will be stored in the raw state as plain-text. ## Example Usage ### Scan Config Basic ```java package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; import com.pulumi.gcp.compute.Address; import com.pulumi.gcp.compute.AddressArgs; import com.pulumi.gcp.compute.SecurityScanConfig; import com.pulumi.gcp.compute.SecurityScanConfigArgs; import com.pulumi.resources.CustomResourceOptions; 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 scannerStaticIp = new Address("scannerStaticIp", AddressArgs.Empty, CustomResourceOptions.builder() .provider(google_beta) .build()); var scan_config = new SecurityScanConfig("scan-config", SecurityScanConfigArgs.builder() .displayName("scan-config") .startingUrls(scannerStaticIp.address().applyValue(address -> String.format("http://%s", address))) .targetPlatforms("COMPUTE") .build(), CustomResourceOptions.builder() .provider(google_beta) .build()); } } ``` ## Import ScanConfig can be imported using any of these accepted formats ```sh $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default projects/{{project}}/scanConfigs/{{name}} ``` ```sh $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{project}}/{{name}} ``` ```sh $ pulumi import gcp:compute/securityScanConfig:SecurityScanConfig default {{name}} ```
-
-
Constructor Summary
Constructors Constructor Description SecurityScanConfig(java.lang.String name)
SecurityScanConfig(java.lang.String name, SecurityScanConfigArgs args)
SecurityScanConfig(java.lang.String name, SecurityScanConfigArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.util.Optional<SecurityScanConfigAuthentication>>
authentication()
com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>
blacklistPatterns()
com.pulumi.core.Output<java.lang.String>
displayName()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
exportToSecurityCommandCenter()
static SecurityScanConfig
get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, SecurityScanConfigState state, com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.util.Optional<java.lang.Integer>>
maxQps()
com.pulumi.core.Output<java.lang.String>
name()
com.pulumi.core.Output<java.lang.String>
project()
com.pulumi.core.Output<java.util.Optional<SecurityScanConfigSchedule>>
schedule()
com.pulumi.core.Output<java.util.List<java.lang.String>>
startingUrls()
com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>>
targetPlatforms()
com.pulumi.core.Output<java.util.Optional<java.lang.String>>
userAgent()
-
-
-
Constructor Detail
-
SecurityScanConfig
public SecurityScanConfig(java.lang.String name)
- Parameters:
name
- The _unique_ name of the resulting resource.
-
SecurityScanConfig
public SecurityScanConfig(java.lang.String name, SecurityScanConfigArgs args)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.
-
SecurityScanConfig
public SecurityScanConfig(java.lang.String name, SecurityScanConfigArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)
- Parameters:
name
- The _unique_ name of the resulting resource.args
- The arguments to use to populate this resource's properties.options
- A bag of options that control this resource's behavior.
-
-
Method Detail
-
authentication
public com.pulumi.core.Output<java.util.Optional<SecurityScanConfigAuthentication>> authentication()
- Returns:
- The authentication configuration. If specified, service will use the authentication configuration during scanning. Structure is documented below.
-
blacklistPatterns
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> blacklistPatterns()
- Returns:
- The blacklist URL patterns as described in https://cloud.google.com/security-scanner/docs/excluded-urls
-
displayName
public com.pulumi.core.Output<java.lang.String> displayName()
- Returns:
- The user provider display name of the ScanConfig.
-
exportToSecurityCommandCenter
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> exportToSecurityCommandCenter()
- Returns:
- Controls export of scan configurations and results to Cloud Security Command Center. Default value is `ENABLED`. Possible values are: `ENABLED`, `DISABLED`.
-
maxQps
public com.pulumi.core.Output<java.util.Optional<java.lang.Integer>> maxQps()
- Returns:
- The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. Defaults to 15.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- A server defined name for this index. Format: `projects/{{project}}/scanConfigs/{{server_generated_id}}`
-
project
public com.pulumi.core.Output<java.lang.String> project()
- Returns:
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
-
schedule
public com.pulumi.core.Output<java.util.Optional<SecurityScanConfigSchedule>> schedule()
- Returns:
- The schedule of the ScanConfig Structure is documented below.
-
startingUrls
public com.pulumi.core.Output<java.util.List<java.lang.String>> startingUrls()
- Returns:
- The starting URLs from which the scanner finds site pages. ***
-
targetPlatforms
public com.pulumi.core.Output<java.util.Optional<java.util.List<java.lang.String>>> targetPlatforms()
- Returns:
- Set of Cloud Platforms targeted by the scan. If empty, APP_ENGINE will be used as a default. Each value may be one of: `APP_ENGINE`, `COMPUTE`.
-
userAgent
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> userAgent()
- Returns:
- Type of the user agents used for scanning Default value is `CHROME_LINUX`. Possible values are: `USER_AGENT_UNSPECIFIED`, `CHROME_LINUX`, `CHROME_ANDROID`, `SAFARI_IPHONE`.
-
get
public static SecurityScanConfig get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable SecurityScanConfigState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name
- The _unique_ name of the resulting resource.id
- The _unique_ provider ID of the resource to lookup.state
-options
- Optional settings to control the behavior of the CustomResource.
-
-