Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.vmwareengine/v1.NetworkPolicy
Explore with Pulumi AI
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope. Auto-naming is currently not supported for this resource.
Create NetworkPolicy Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkPolicy(name: string, args: NetworkPolicyArgs, opts?: CustomResourceOptions);
@overload
def NetworkPolicy(resource_name: str,
args: NetworkPolicyArgs,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkPolicy(resource_name: str,
opts: Optional[ResourceOptions] = None,
edge_services_cidr: Optional[str] = None,
network_policy_id: Optional[str] = None,
description: Optional[str] = None,
external_ip: Optional[NetworkServiceArgs] = None,
internet_access: Optional[NetworkServiceArgs] = None,
location: Optional[str] = None,
project: Optional[str] = None,
request_id: Optional[str] = None,
vmware_engine_network: Optional[str] = None)
func NewNetworkPolicy(ctx *Context, name string, args NetworkPolicyArgs, opts ...ResourceOption) (*NetworkPolicy, error)
public NetworkPolicy(string name, NetworkPolicyArgs args, CustomResourceOptions? opts = null)
public NetworkPolicy(String name, NetworkPolicyArgs args)
public NetworkPolicy(String name, NetworkPolicyArgs args, CustomResourceOptions options)
type: google-native:vmwareengine/v1:NetworkPolicy
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 NetworkPolicyArgs
- 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 NetworkPolicyArgs
- 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 NetworkPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkPolicyArgs
- 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 networkPolicyResource = new GoogleNative.VMwareEngine.V1.NetworkPolicy("networkPolicyResource", new()
{
EdgeServicesCidr = "string",
NetworkPolicyId = "string",
Description = "string",
ExternalIp = new GoogleNative.VMwareEngine.V1.Inputs.NetworkServiceArgs
{
Enabled = false,
},
InternetAccess = new GoogleNative.VMwareEngine.V1.Inputs.NetworkServiceArgs
{
Enabled = false,
},
Location = "string",
Project = "string",
RequestId = "string",
VmwareEngineNetwork = "string",
});
example, err := vmwareengine.NewNetworkPolicy(ctx, "networkPolicyResource", &vmwareengine.NetworkPolicyArgs{
EdgeServicesCidr: pulumi.String("string"),
NetworkPolicyId: pulumi.String("string"),
Description: pulumi.String("string"),
ExternalIp: &vmwareengine.NetworkServiceArgs{
Enabled: pulumi.Bool(false),
},
InternetAccess: &vmwareengine.NetworkServiceArgs{
Enabled: pulumi.Bool(false),
},
Location: pulumi.String("string"),
Project: pulumi.String("string"),
RequestId: pulumi.String("string"),
VmwareEngineNetwork: pulumi.String("string"),
})
var networkPolicyResource = new NetworkPolicy("networkPolicyResource", NetworkPolicyArgs.builder()
.edgeServicesCidr("string")
.networkPolicyId("string")
.description("string")
.externalIp(NetworkServiceArgs.builder()
.enabled(false)
.build())
.internetAccess(NetworkServiceArgs.builder()
.enabled(false)
.build())
.location("string")
.project("string")
.requestId("string")
.vmwareEngineNetwork("string")
.build());
network_policy_resource = google_native.vmwareengine.v1.NetworkPolicy("networkPolicyResource",
edge_services_cidr="string",
network_policy_id="string",
description="string",
external_ip={
"enabled": False,
},
internet_access={
"enabled": False,
},
location="string",
project="string",
request_id="string",
vmware_engine_network="string")
const networkPolicyResource = new google_native.vmwareengine.v1.NetworkPolicy("networkPolicyResource", {
edgeServicesCidr: "string",
networkPolicyId: "string",
description: "string",
externalIp: {
enabled: false,
},
internetAccess: {
enabled: false,
},
location: "string",
project: "string",
requestId: "string",
vmwareEngineNetwork: "string",
});
type: google-native:vmwareengine/v1:NetworkPolicy
properties:
description: string
edgeServicesCidr: string
externalIp:
enabled: false
internetAccess:
enabled: false
location: string
networkPolicyId: string
project: string
requestId: string
vmwareEngineNetwork: string
NetworkPolicy 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 NetworkPolicy resource accepts the following input properties:
- Edge
Services stringCidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- Network
Policy stringId - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - Description string
- Optional. User-provided description for this network policy.
- External
Ip Pulumi.Google Native. VMware Engine. V1. Inputs. Network Service - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - Internet
Access Pulumi.Google Native. VMware Engine. V1. Inputs. Network Service - Network service that allows VMware workloads to access the internet.
- Location string
- Project string
- Request
Id string - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- Vmware
Engine stringNetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
- Edge
Services stringCidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- Network
Policy stringId - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - Description string
- Optional. User-provided description for this network policy.
- External
Ip NetworkService Args - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - Internet
Access NetworkService Args - Network service that allows VMware workloads to access the internet.
- Location string
- Project string
- Request
Id string - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- Vmware
Engine stringNetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
- edge
Services StringCidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- network
Policy StringId - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - description String
- Optional. User-provided description for this network policy.
- external
Ip NetworkService - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - internet
Access NetworkService - Network service that allows VMware workloads to access the internet.
- location String
- project String
- request
Id String - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- vmware
Engine StringNetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
- edge
Services stringCidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- network
Policy stringId - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - description string
- Optional. User-provided description for this network policy.
- external
Ip NetworkService - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - internet
Access NetworkService - Network service that allows VMware workloads to access the internet.
- location string
- project string
- request
Id string - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- vmware
Engine stringNetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
- edge_
services_ strcidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- network_
policy_ strid - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - description str
- Optional. User-provided description for this network policy.
- external_
ip NetworkService Args - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - internet_
access NetworkService Args - Network service that allows VMware workloads to access the internet.
- location str
- project str
- request_
id str - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- vmware_
engine_ strnetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
- edge
Services StringCidr - IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a "/26" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.
- network
Policy StringId - Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent
projects/{my-project}/locations/{us-central1}/networkPolicies
and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with RFC 1034 (section 3.5) - description String
- Optional. User-provided description for this network policy.
- external
Ip Property Map - Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when
internet_access
is also enabled. - internet
Access Property Map - Network service that allows VMware workloads to access the internet.
- location String
- project String
- request
Id String - Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).
- vmware
Engine StringNetwork - Optional. The relative resource name of the VMware Engine network. Specify the name in the following form:
projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
where{project}
can either be a project number or a project ID.
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkPolicy resource produces the following output properties:
- Create
Time string - Creation time of this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- Uid string
- System-generated unique identifier for the resource.
- Update
Time string - Last update time of this resource.
- Vmware
Engine stringNetwork Canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
- Create
Time string - Creation time of this resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- Uid string
- System-generated unique identifier for the resource.
- Update
Time string - Last update time of this resource.
- Vmware
Engine stringNetwork Canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
- create
Time String - Creation time of this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- uid String
- System-generated unique identifier for the resource.
- update
Time String - Last update time of this resource.
- vmware
Engine StringNetwork Canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
- create
Time string - Creation time of this resource.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- uid string
- System-generated unique identifier for the resource.
- update
Time string - Last update time of this resource.
- vmware
Engine stringNetwork Canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
- create_
time str - Creation time of this resource.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- uid str
- System-generated unique identifier for the resource.
- update_
time str - Last update time of this resource.
- vmware_
engine_ strnetwork_ canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
- create
Time String - Creation time of this resource.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example:
projects/my-project/locations/us-central1/networkPolicies/my-network-policy
- uid String
- System-generated unique identifier for the resource.
- update
Time String - Last update time of this resource.
- vmware
Engine StringNetwork Canonical - The canonical name of the VMware Engine network in the form:
projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}
Supporting Types
NetworkService, NetworkServiceArgs
- Enabled bool
- True if the service is enabled; false otherwise.
- Enabled bool
- True if the service is enabled; false otherwise.
- enabled Boolean
- True if the service is enabled; false otherwise.
- enabled boolean
- True if the service is enabled; false otherwise.
- enabled bool
- True if the service is enabled; false otherwise.
- enabled Boolean
- True if the service is enabled; false otherwise.
NetworkServiceResponse, NetworkServiceResponseArgs
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.