gcp.networksecurity.UrlList
Explore with Pulumi AI
UrlList proto helps users to set reusable, independently manageable lists of hosts, host patterns, URLs, URL patterns.
To get more information about UrlLists, see:
- API documentation
- How-to Guides
- Use UrlLists
Example Usage
Network Security Url Lists Basic
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.UrlList("default", {
name: "my-url-lists",
location: "us-central1",
values: ["www.example.com"],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.UrlList("default",
name="my-url-lists",
location="us-central1",
values=["www.example.com"])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewUrlList(ctx, "default", &networksecurity.UrlListArgs{
Name: pulumi.String("my-url-lists"),
Location: pulumi.String("us-central1"),
Values: pulumi.StringArray{
pulumi.String("www.example.com"),
},
})
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 @default = new Gcp.NetworkSecurity.UrlList("default", new()
{
Name = "my-url-lists",
Location = "us-central1",
Values = new[]
{
"www.example.com",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.UrlList;
import com.pulumi.gcp.networksecurity.UrlListArgs;
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 default_ = new UrlList("default", UrlListArgs.builder()
.name("my-url-lists")
.location("us-central1")
.values("www.example.com")
.build());
}
}
resources:
default:
type: gcp:networksecurity:UrlList
properties:
name: my-url-lists
location: us-central1
values:
- www.example.com
Network Security Url Lists Advanced
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.networksecurity.UrlList("default", {
name: "my-url-lists",
location: "us-central1",
description: "my description",
values: [
"www.example.com",
"about.example.com",
"github.com/example-org/*",
],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.networksecurity.UrlList("default",
name="my-url-lists",
location="us-central1",
description="my description",
values=[
"www.example.com",
"about.example.com",
"github.com/example-org/*",
])
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/networksecurity"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := networksecurity.NewUrlList(ctx, "default", &networksecurity.UrlListArgs{
Name: pulumi.String("my-url-lists"),
Location: pulumi.String("us-central1"),
Description: pulumi.String("my description"),
Values: pulumi.StringArray{
pulumi.String("www.example.com"),
pulumi.String("about.example.com"),
pulumi.String("github.com/example-org/*"),
},
})
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 @default = new Gcp.NetworkSecurity.UrlList("default", new()
{
Name = "my-url-lists",
Location = "us-central1",
Description = "my description",
Values = new[]
{
"www.example.com",
"about.example.com",
"github.com/example-org/*",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.networksecurity.UrlList;
import com.pulumi.gcp.networksecurity.UrlListArgs;
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 default_ = new UrlList("default", UrlListArgs.builder()
.name("my-url-lists")
.location("us-central1")
.description("my description")
.values(
"www.example.com",
"about.example.com",
"github.com/example-org/*")
.build());
}
}
resources:
default:
type: gcp:networksecurity:UrlList
properties:
name: my-url-lists
location: us-central1
description: my description
values:
- www.example.com
- about.example.com
- github.com/example-org/*
Create UrlList Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new UrlList(name: string, args: UrlListArgs, opts?: CustomResourceOptions);
@overload
def UrlList(resource_name: str,
args: UrlListArgs,
opts: Optional[ResourceOptions] = None)
@overload
def UrlList(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
values: Optional[Sequence[str]] = None,
description: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None)
func NewUrlList(ctx *Context, name string, args UrlListArgs, opts ...ResourceOption) (*UrlList, error)
public UrlList(string name, UrlListArgs args, CustomResourceOptions? opts = null)
public UrlList(String name, UrlListArgs args)
public UrlList(String name, UrlListArgs args, CustomResourceOptions options)
type: gcp:networksecurity:UrlList
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 UrlListArgs
- 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 UrlListArgs
- 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 UrlListArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args UrlListArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args UrlListArgs
- 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 urlListResource = new Gcp.NetworkSecurity.UrlList("urlListResource", new()
{
Location = "string",
Values = new[]
{
"string",
},
Description = "string",
Name = "string",
Project = "string",
});
example, err := networksecurity.NewUrlList(ctx, "urlListResource", &networksecurity.UrlListArgs{
Location: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var urlListResource = new UrlList("urlListResource", UrlListArgs.builder()
.location("string")
.values("string")
.description("string")
.name("string")
.project("string")
.build());
url_list_resource = gcp.networksecurity.UrlList("urlListResource",
location="string",
values=["string"],
description="string",
name="string",
project="string")
const urlListResource = new gcp.networksecurity.UrlList("urlListResource", {
location: "string",
values: ["string"],
description: "string",
name: "string",
project: "string",
});
type: gcp:networksecurity:UrlList
properties:
description: string
location: string
name: string
project: string
values:
- string
UrlList 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 UrlList resource accepts the following input properties:
- Location string
- The location of the url lists.
- Values List<string>
- FQDNs and URLs.
- Description string
- Free-text description of the resource.
- Name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Location string
- The location of the url lists.
- Values []string
- FQDNs and URLs.
- Description string
- Free-text description of the resource.
- Name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location of the url lists.
- values List<String>
- FQDNs and URLs.
- description String
- Free-text description of the resource.
- name String
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location string
- The location of the url lists.
- values string[]
- FQDNs and URLs.
- description string
- Free-text description of the resource.
- name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location str
- The location of the url lists.
- values Sequence[str]
- FQDNs and URLs.
- description str
- Free-text description of the resource.
- name str
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- location String
- The location of the url lists.
- values List<String>
- FQDNs and URLs.
- description String
- Free-text description of the resource.
- name String
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
Outputs
All input properties are implicitly available as output properties. Additionally, the UrlList resource produces the following output properties:
- Create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- Create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- Id string
- The provider-assigned unique ID for this managed resource.
- Update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- create
Time String - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- id string
- The provider-assigned unique ID for this managed resource.
- update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- create_
time str - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- id str
- The provider-assigned unique ID for this managed resource.
- update_
time str - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- create
Time String - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- id String
- The provider-assigned unique ID for this managed resource.
- update
Time String - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
Look up Existing UrlList Resource
Get an existing UrlList 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?: UrlListState, opts?: CustomResourceOptions): UrlList
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
create_time: Optional[str] = None,
description: Optional[str] = None,
location: Optional[str] = None,
name: Optional[str] = None,
project: Optional[str] = None,
update_time: Optional[str] = None,
values: Optional[Sequence[str]] = None) -> UrlList
func GetUrlList(ctx *Context, name string, id IDInput, state *UrlListState, opts ...ResourceOption) (*UrlList, error)
public static UrlList Get(string name, Input<string> id, UrlListState? state, CustomResourceOptions? opts = null)
public static UrlList get(String name, Output<String> id, UrlListState 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.
- Create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- Description string
- Free-text description of the resource.
- Location string
- The location of the url lists.
- Name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- Values List<string>
- FQDNs and URLs.
- Create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- Description string
- Free-text description of the resource.
- Location string
- The location of the url lists.
- Name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- Project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- Update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- Values []string
- FQDNs and URLs.
- create
Time String - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- description String
- Free-text description of the resource.
- location String
- The location of the url lists.
- name String
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- values List<String>
- FQDNs and URLs.
- create
Time string - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- description string
- Free-text description of the resource.
- location string
- The location of the url lists.
- name string
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project string
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time string - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- values string[]
- FQDNs and URLs.
- create_
time str - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- description str
- Free-text description of the resource.
- location str
- The location of the url lists.
- name str
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project str
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update_
time str - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- values Sequence[str]
- FQDNs and URLs.
- create
Time String - Output only. Time when the security policy was created. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'
- description String
- Free-text description of the resource.
- location String
- The location of the url lists.
- name String
- Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. 'urlList'.
- project String
- The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
- update
Time String - Output only. Time when the security policy was updated. A timestamp in RFC3339 UTC 'Zulu' format, with nanosecond resolution and up to nine fractional digits. Examples: '2014-10-02T15:01:23Z' and '2014-10-02T15:01:23.045123456Z'.
- values List<String>
- FQDNs and URLs.
Import
UrlLists can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/urlLists/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, UrlLists can be imported using one of the formats above. For example:
$ pulumi import gcp:networksecurity/urlList:UrlList default projects/{{project}}/locations/{{location}}/urlLists/{{name}}
$ pulumi import gcp:networksecurity/urlList:UrlList default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:networksecurity/urlList:UrlList default {{location}}/{{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.