|
| 1 | +# Copyright 2024 Google Inc. |
| 2 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 3 | +# you may not use this file except in compliance with the License. |
| 4 | +# You may obtain a copy of the License at |
| 5 | +# |
| 6 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 7 | +# |
| 8 | +# Unless required by applicable law or agreed to in writing, software |
| 9 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 10 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 11 | +# See the License for the specific language governing permissions and |
| 12 | +# limitations under the License. |
| 13 | + |
| 14 | +--- |
| 15 | +name: 'RegionNetworkPolicy' |
| 16 | +api_resource_type_kind: NetworkPolicy |
| 17 | +description: "The Compute NetworkFirewallPolicy resource" |
| 18 | +docs: |
| 19 | +min_version: beta |
| 20 | +base_url: 'projects/{{project}}/regions/{{region}}/networkPolicies' |
| 21 | +self_link: 'projects/{{project}}/regions/{{region}}/networkPolicies/{{name}}' |
| 22 | +create_url: 'projects/{{project}}/regions/{{region}}/networkPolicies' |
| 23 | +update_verb: 'PATCH' |
| 24 | +timeouts: |
| 25 | + insert_minutes: 20 |
| 26 | + update_minutes: 20 |
| 27 | + delete_minutes: 20 |
| 28 | +async: |
| 29 | + actions: ['create', 'delete', 'update'] |
| 30 | + type: 'OpAsync' |
| 31 | + operation: |
| 32 | + base_url: '{{op_id}}' |
| 33 | + result: |
| 34 | + resource_inside_response: false |
| 35 | +custom_code: |
| 36 | +samples: |
| 37 | + - name: "region_network_policy_update" |
| 38 | + primary_resource_id: "policy" |
| 39 | + min_version: beta |
| 40 | + steps: |
| 41 | + - name: "region_network_policy_full" |
| 42 | + resource_id_vars: |
| 43 | + policy_name: "region-np-full" |
| 44 | + vars: |
| 45 | + description_field: "Terraform network policy create test" |
| 46 | + - name: "region_network_policy_full" |
| 47 | + resource_id_vars: |
| 48 | + policy_name: "region-np-full" |
| 49 | + vars: |
| 50 | + description_field: "Terraform network policy update test" |
| 51 | +parameters: |
| 52 | + - name: 'region' |
| 53 | + type: String |
| 54 | + description: The region of this resource. |
| 55 | + url_param_only: true |
| 56 | + immutable: true |
| 57 | + default_from_api: true |
| 58 | +properties: |
| 59 | + - name: 'creationTimestamp' |
| 60 | + type: String |
| 61 | + description: Creation timestamp in RFC3339 text format. |
| 62 | + output: true |
| 63 | + - name: 'name' |
| 64 | + type: String |
| 65 | + description: User-provided name of the Network policy. The name should be unique in the project in which the policy is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. |
| 66 | + required: true |
| 67 | + immutable: true |
| 68 | + - name: 'regionNetworkPolicyId' |
| 69 | + type: String |
| 70 | + description: The unique identifier for the resource. This identifier is defined by the server. |
| 71 | + api_name: id |
| 72 | + output: true |
| 73 | + - name: 'description' |
| 74 | + type: String |
| 75 | + description: An optional description of this resource. Provide this property when you create the resource. |
| 76 | + - name: 'selfLink' |
| 77 | + type: String |
| 78 | + description: Server-defined URL for the resource. |
| 79 | + output: true |
| 80 | + - name: 'selfLinkWithId' |
| 81 | + type: String |
| 82 | + description: Server-defined URL for this resource with the resource id. |
| 83 | + output: true |
| 84 | + - name: 'associations' |
| 85 | + type: Array |
| 86 | + description: | |
| 87 | + [Output Only] A list of associations that belong to this network policy. |
| 88 | + output: true |
| 89 | + item_type: |
| 90 | + type: NestedObject |
| 91 | + properties: |
| 92 | + - name: 'name' |
| 93 | + type: String |
| 94 | + description: | |
| 95 | + The name for an association. |
| 96 | + - name: 'attachmentTarget' |
| 97 | + type: String |
| 98 | + description: | |
| 99 | + The target that the network policy is attached to. |
| 100 | + - name: 'ruleTupleCount' |
| 101 | + type: Integer |
| 102 | + description: Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples. |
| 103 | + output: true |
0 commit comments