Skip to content

Commit 78c86ec

Browse files
authored
docs(samples): modified region tag to match apikey service (#8869)
1 parent e1603e5 commit 78c86ec

9 files changed

+18
-18
lines changed

auth/api-client/authenticate_with_api_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_authenticate_api_key]
15+
# [START apikeys_authenticate_api_key]
1616

1717
from google.cloud import language_v1
1818

@@ -46,4 +46,4 @@ def authenticate_with_api_key(quota_project_id: str, api_key_string: str) -> Non
4646
print(f"Sentiment: {sentiment.score}, {sentiment.magnitude}")
4747
print("Successfully authenticated using the API key")
4848

49-
# [END auth_cloud_authenticate_api_key]
49+
# [END apikeys_authenticate_api_key]

auth/api-client/create_api_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_create_api_key]
15+
# [START apikeys_create_api_key]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -53,4 +53,4 @@ def create_api_key(project_id: str) -> Key:
5353
# To restrict the usage of this API key, use the value in "response.name".
5454
return response
5555

56-
# [END auth_cloud_create_api_key]
56+
# [END apikeys_create_api_key]

auth/api-client/delete_api_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_delete_api_key]
15+
# [START apikeys_delete_api_key]
1616

1717
from google.cloud import api_keys_v2
1818

@@ -42,4 +42,4 @@ def delete_api_key(project_id: str, key_id: str) -> None:
4242
result = client.delete_key(delete_key_request).result()
4343
print(f"Successfully deleted the API key: {result.name}")
4444

45-
# [END auth_cloud_delete_api_key]
45+
# [END apikeys_delete_api_key]

auth/api-client/lookup_api_key.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_lookup_api_key]
15+
# [START apikeys_lookup_api_key]
1616

1717
from google.cloud import api_keys_v2
1818

@@ -45,4 +45,4 @@ def lookup_api_key(api_key_string: str) -> None:
4545

4646
print(f"Successfully retrieved the API key name: {lookup_key_response.name}")
4747

48-
# [END auth_cloud_lookup_api_key]
48+
# [END apikeys_lookup_api_key]

auth/api-client/restrict_api_key_android.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_restrict_api_key_android]
15+
# [START apikeys_restrict_api_key_android]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -70,4 +70,4 @@ def restrict_api_key_android(project_id: str, key_id: str) -> Key:
7070
# Use response.key_string to authenticate.
7171
return response
7272

73-
# [END auth_cloud_restrict_api_key_android]
73+
# [END apikeys_restrict_api_key_android]

auth/api-client/restrict_api_key_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_restrict_api_key_api]
15+
# [START apikeys_restrict_api_key_api]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -65,4 +65,4 @@ def restrict_api_key_api(project_id: str, key_id: str) -> Key:
6565
# Use response.key_string to authenticate.
6666
return response
6767

68-
# [END auth_cloud_restrict_api_key_api]
68+
# [END apikeys_restrict_api_key_api]

auth/api-client/restrict_api_key_http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_restrict_api_key_http]
15+
# [START apikeys_restrict_api_key_http]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -64,4 +64,4 @@ def restrict_api_key_http(project_id: str, key_id: str) -> Key:
6464
# Use response.key_string to authenticate.
6565
return response
6666

67-
# [END auth_cloud_restrict_api_key_http]
67+
# [END apikeys_restrict_api_key_http]

auth/api-client/restrict_api_key_ios.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_restrict_api_key_ios]
15+
# [START apikeys_restrict_api_key_ios]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -64,4 +64,4 @@ def restrict_api_key_ios(project_id: str, key_id: str) -> Key:
6464
# Use response.key_string to authenticate.
6565
return response
6666

67-
# [END auth_cloud_restrict_api_key_ios]
67+
# [END apikeys_restrict_api_key_ios]

auth/api-client/restrict_api_key_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START auth_cloud_restrict_api_key_server]
15+
# [START apikeys_restrict_api_key_server]
1616

1717
from google.cloud import api_keys_v2
1818
from google.cloud.api_keys_v2 import Key
@@ -65,4 +65,4 @@ def restrict_api_key_server(project_id: str, key_id: str) -> Key:
6565
# Use response.key_string to authenticate.
6666
return response
6767

68-
# [END auth_cloud_restrict_api_key_server]
68+
# [END apikeys_restrict_api_key_server]

0 commit comments

Comments
 (0)