@@ -912,6 +912,100 @@ public final BackendServiceGroupHealth getHealth(GetHealthBackendServiceRequest
912
912
return stub .getHealthCallable ();
913
913
}
914
914
915
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
916
+ /**
917
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
918
+ * exists.
919
+ *
920
+ * <p>Sample code:
921
+ *
922
+ * <pre>{@code
923
+ * // This snippet has been automatically generated and should be regarded as a code template only.
924
+ * // It will require modifications to work:
925
+ * // - It may require correct/in-range values for request initialization.
926
+ * // - It may require specifying regional endpoints when creating the service client as shown in
927
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
928
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
929
+ * String project = "project-309310695";
930
+ * String resource = "resource-341064690";
931
+ * Policy response = backendServicesClient.getIamPolicy(project, resource);
932
+ * }
933
+ * }</pre>
934
+ *
935
+ * @param project Project ID for this request.
936
+ * @param resource Name or id of the resource for this request.
937
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
938
+ */
939
+ public final Policy getIamPolicy (String project , String resource ) {
940
+ GetIamPolicyBackendServiceRequest request =
941
+ GetIamPolicyBackendServiceRequest .newBuilder ()
942
+ .setProject (project )
943
+ .setResource (resource )
944
+ .build ();
945
+ return getIamPolicy (request );
946
+ }
947
+
948
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
949
+ /**
950
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
951
+ * exists.
952
+ *
953
+ * <p>Sample code:
954
+ *
955
+ * <pre>{@code
956
+ * // This snippet has been automatically generated and should be regarded as a code template only.
957
+ * // It will require modifications to work:
958
+ * // - It may require correct/in-range values for request initialization.
959
+ * // - It may require specifying regional endpoints when creating the service client as shown in
960
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
961
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
962
+ * GetIamPolicyBackendServiceRequest request =
963
+ * GetIamPolicyBackendServiceRequest.newBuilder()
964
+ * .setOptionsRequestedPolicyVersion(-574521795)
965
+ * .setProject("project-309310695")
966
+ * .setResource("resource-341064690")
967
+ * .build();
968
+ * Policy response = backendServicesClient.getIamPolicy(request);
969
+ * }
970
+ * }</pre>
971
+ *
972
+ * @param request The request object containing all of the parameters for the API call.
973
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
974
+ */
975
+ public final Policy getIamPolicy (GetIamPolicyBackendServiceRequest request ) {
976
+ return getIamPolicyCallable ().call (request );
977
+ }
978
+
979
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
980
+ /**
981
+ * Gets the access control policy for a resource. May be empty if no such policy or resource
982
+ * exists.
983
+ *
984
+ * <p>Sample code:
985
+ *
986
+ * <pre>{@code
987
+ * // This snippet has been automatically generated and should be regarded as a code template only.
988
+ * // It will require modifications to work:
989
+ * // - It may require correct/in-range values for request initialization.
990
+ * // - It may require specifying regional endpoints when creating the service client as shown in
991
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
992
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
993
+ * GetIamPolicyBackendServiceRequest request =
994
+ * GetIamPolicyBackendServiceRequest.newBuilder()
995
+ * .setOptionsRequestedPolicyVersion(-574521795)
996
+ * .setProject("project-309310695")
997
+ * .setResource("resource-341064690")
998
+ * .build();
999
+ * ApiFuture<Policy> future = backendServicesClient.getIamPolicyCallable().futureCall(request);
1000
+ * // Do something.
1001
+ * Policy response = future.get();
1002
+ * }
1003
+ * }</pre>
1004
+ */
1005
+ public final UnaryCallable <GetIamPolicyBackendServiceRequest , Policy > getIamPolicyCallable () {
1006
+ return stub .getIamPolicyCallable ();
1007
+ }
1008
+
915
1009
// AUTO-GENERATED DOCUMENTATION AND METHOD.
916
1010
/**
917
1011
* Creates a BackendService resource in the specified project using the data included in the
@@ -1464,6 +1558,103 @@ public final OperationFuture<Operation, Operation> setEdgeSecurityPolicyAsync(
1464
1558
return stub .setEdgeSecurityPolicyCallable ();
1465
1559
}
1466
1560
1561
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1562
+ /**
1563
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
1564
+ *
1565
+ * <p>Sample code:
1566
+ *
1567
+ * <pre>{@code
1568
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1569
+ * // It will require modifications to work:
1570
+ * // - It may require correct/in-range values for request initialization.
1571
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1572
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1573
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1574
+ * String project = "project-309310695";
1575
+ * String resource = "resource-341064690";
1576
+ * GlobalSetPolicyRequest globalSetPolicyRequestResource =
1577
+ * GlobalSetPolicyRequest.newBuilder().build();
1578
+ * Policy response =
1579
+ * backendServicesClient.setIamPolicy(project, resource, globalSetPolicyRequestResource);
1580
+ * }
1581
+ * }</pre>
1582
+ *
1583
+ * @param project Project ID for this request.
1584
+ * @param resource Name or id of the resource for this request.
1585
+ * @param globalSetPolicyRequestResource The body resource for this request
1586
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1587
+ */
1588
+ public final Policy setIamPolicy (
1589
+ String project , String resource , GlobalSetPolicyRequest globalSetPolicyRequestResource ) {
1590
+ SetIamPolicyBackendServiceRequest request =
1591
+ SetIamPolicyBackendServiceRequest .newBuilder ()
1592
+ .setProject (project )
1593
+ .setResource (resource )
1594
+ .setGlobalSetPolicyRequestResource (globalSetPolicyRequestResource )
1595
+ .build ();
1596
+ return setIamPolicy (request );
1597
+ }
1598
+
1599
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1600
+ /**
1601
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
1602
+ *
1603
+ * <p>Sample code:
1604
+ *
1605
+ * <pre>{@code
1606
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1607
+ * // It will require modifications to work:
1608
+ * // - It may require correct/in-range values for request initialization.
1609
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1610
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1611
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1612
+ * SetIamPolicyBackendServiceRequest request =
1613
+ * SetIamPolicyBackendServiceRequest.newBuilder()
1614
+ * .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
1615
+ * .setProject("project-309310695")
1616
+ * .setResource("resource-341064690")
1617
+ * .build();
1618
+ * Policy response = backendServicesClient.setIamPolicy(request);
1619
+ * }
1620
+ * }</pre>
1621
+ *
1622
+ * @param request The request object containing all of the parameters for the API call.
1623
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1624
+ */
1625
+ public final Policy setIamPolicy (SetIamPolicyBackendServiceRequest request ) {
1626
+ return setIamPolicyCallable ().call (request );
1627
+ }
1628
+
1629
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
1630
+ /**
1631
+ * Sets the access control policy on the specified resource. Replaces any existing policy.
1632
+ *
1633
+ * <p>Sample code:
1634
+ *
1635
+ * <pre>{@code
1636
+ * // This snippet has been automatically generated and should be regarded as a code template only.
1637
+ * // It will require modifications to work:
1638
+ * // - It may require correct/in-range values for request initialization.
1639
+ * // - It may require specifying regional endpoints when creating the service client as shown in
1640
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1641
+ * try (BackendServicesClient backendServicesClient = BackendServicesClient.create()) {
1642
+ * SetIamPolicyBackendServiceRequest request =
1643
+ * SetIamPolicyBackendServiceRequest.newBuilder()
1644
+ * .setGlobalSetPolicyRequestResource(GlobalSetPolicyRequest.newBuilder().build())
1645
+ * .setProject("project-309310695")
1646
+ * .setResource("resource-341064690")
1647
+ * .build();
1648
+ * ApiFuture<Policy> future = backendServicesClient.setIamPolicyCallable().futureCall(request);
1649
+ * // Do something.
1650
+ * Policy response = future.get();
1651
+ * }
1652
+ * }</pre>
1653
+ */
1654
+ public final UnaryCallable <SetIamPolicyBackendServiceRequest , Policy > setIamPolicyCallable () {
1655
+ return stub .setIamPolicyCallable ();
1656
+ }
1657
+
1467
1658
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1468
1659
/**
1469
1660
* Sets the Google Cloud Armor security policy for the specified backend service. For more
0 commit comments