2020
2121def create_model_armor_template (
2222 project_id : str ,
23- location : str ,
23+ location_id : str ,
2424 template_id : str ,
2525) -> modelarmor_v1 .Template :
2626 """Create a new Model Armor template.
2727
2828 Args:
2929 project_id (str): Google Cloud project ID.
30- location (str): Google Cloud location.
30+ location_id (str): Google Cloud location.
3131 template_id (str): ID for the template to create.
3232
3333 Returns:
@@ -40,14 +40,14 @@ def create_model_armor_template(
4040
4141 # TODO(Developer): Uncomment these variables.
4242 # project_id = "your-google-cloud-project-id"
43- # location = "us-central1"
43+ # location_id = "us-central1"
4444 # template_id = "template_id"
4545
4646 # Create the Model Armor client.
4747 client = modelarmor_v1 .ModelArmorClient (
4848 transport = "rest" ,
4949 client_options = ClientOptions (
50- api_endpoint = f"modelarmor.{ location } .rep.googleapis.com"
50+ api_endpoint = f"modelarmor.{ location_id } .rep.googleapis.com"
5151 ),
5252 )
5353
@@ -68,7 +68,7 @@ def create_model_armor_template(
6868
6969 # Prepare the request for creating the template.
7070 request = modelarmor_v1 .CreateTemplateRequest (
71- parent = f"projects/{ project_id } /locations/{ location } " ,
71+ parent = f"projects/{ project_id } /locations/{ location_id } " ,
7272 template_id = template_id ,
7373 template = template ,
7474 )
0 commit comments