20
20
21
21
def create_model_armor_template (
22
22
project_id : str ,
23
- location : str ,
23
+ location_id : str ,
24
24
template_id : str ,
25
25
) -> modelarmor_v1 .Template :
26
26
"""Create a new Model Armor template.
27
27
28
28
Args:
29
29
project_id (str): Google Cloud project ID.
30
- location (str): Google Cloud location.
30
+ location_id (str): Google Cloud location.
31
31
template_id (str): ID for the template to create.
32
32
33
33
Returns:
@@ -40,14 +40,14 @@ def create_model_armor_template(
40
40
41
41
# TODO(Developer): Uncomment these variables.
42
42
# project_id = "your-google-cloud-project-id"
43
- # location = "us-central1"
43
+ # location_id = "us-central1"
44
44
# template_id = "template_id"
45
45
46
46
# Create the Model Armor client.
47
47
client = modelarmor_v1 .ModelArmorClient (
48
48
transport = "rest" ,
49
49
client_options = ClientOptions (
50
- api_endpoint = f"modelarmor.{ location } .rep.googleapis.com"
50
+ api_endpoint = f"modelarmor.{ location_id } .rep.googleapis.com"
51
51
),
52
52
)
53
53
@@ -68,7 +68,7 @@ def create_model_armor_template(
68
68
69
69
# Prepare the request for creating the template.
70
70
request = modelarmor_v1 .CreateTemplateRequest (
71
- parent = f"projects/{ project_id } /locations/{ location } " ,
71
+ parent = f"projects/{ project_id } /locations/{ location_id } " ,
72
72
template_id = template_id ,
73
73
template = template ,
74
74
)
0 commit comments