@@ -637,9 +637,9 @@ def get_project_location_reservation(name, fields: nil, quota_user: nil, options
637637 # Gets the access control policy for a resource. May return: * A`NOT_FOUND`
638638 # error if the resource doesn't exist or you don't have the permission to view
639639 # it. * An empty policy if the resource exists but doesn't have a set policy.
640- # Supported resources are: - Reservations To call this method, you must have the
641- # following Google IAM permissions: - `bigqueryreservation.reservations.
642- # getIamPolicy` to get policies on reservations.
640+ # Supported resources are: - Reservations - ReservationAssignments To call this
641+ # method, you must have the following Google IAM permissions: - `
642+ # bigqueryreservation.reservations. getIamPolicy` to get policies on reservations.
643643 # @param [String] resource
644644 # REQUIRED: The resource for which the policy is being requested. See [Resource
645645 # names](https://cloud.google.com/apis/design/resource_names) for the
@@ -930,6 +930,55 @@ def delete_project_location_reservation_assignment(name, fields: nil, quota_user
930930 execute_or_queue_command ( command , &block )
931931 end
932932
933+ # Gets the access control policy for a resource. May return: * A`NOT_FOUND`
934+ # error if the resource doesn't exist or you don't have the permission to view
935+ # it. * An empty policy if the resource exists but doesn't have a set policy.
936+ # Supported resources are: - Reservations - ReservationAssignments To call this
937+ # method, you must have the following Google IAM permissions: - `
938+ # bigqueryreservation.reservations.getIamPolicy` to get policies on reservations.
939+ # @param [String] resource
940+ # REQUIRED: The resource for which the policy is being requested. See [Resource
941+ # names](https://cloud.google.com/apis/design/resource_names) for the
942+ # appropriate value for this field.
943+ # @param [Fixnum] options_requested_policy_version
944+ # Optional. The maximum policy version that will be used to format the policy.
945+ # Valid values are 0, 1, and 3. Requests specifying an invalid value will be
946+ # rejected. Requests for policies with any conditional role bindings must
947+ # specify version 3. Policies with no conditional role bindings may specify any
948+ # valid value or leave the field unset. The policy in the response might use the
949+ # policy version that you specified, or it might use a lower policy version. For
950+ # example, if you specify version 3, but the policy has no conditional role
951+ # bindings, the response uses version 1. To learn which resources support
952+ # conditions in their IAM policies, see the [IAM documentation](https://cloud.
953+ # google.com/iam/help/conditions/resource-policies).
954+ # @param [String] fields
955+ # Selector specifying which fields to include in a partial response.
956+ # @param [String] quota_user
957+ # Available to use for quota purposes for server-side applications. Can be any
958+ # arbitrary string assigned to a user, but should not exceed 40 characters.
959+ # @param [Google::Apis::RequestOptions] options
960+ # Request-specific options
961+ #
962+ # @yield [result, err] Result & error if block supplied
963+ # @yieldparam result [Google::Apis::BigqueryreservationV1::Policy] parsed result object
964+ # @yieldparam err [StandardError] error object if request failed
965+ #
966+ # @return [Google::Apis::BigqueryreservationV1::Policy]
967+ #
968+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
969+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
970+ # @raise [Google::Apis::AuthorizationError] Authorization is required
971+ def get_project_location_reservation_assignment_iam_policy ( resource , options_requested_policy_version : nil , fields : nil , quota_user : nil , options : nil , &block )
972+ command = make_simple_command ( :get , 'v1/{+resource}:getIamPolicy' , options )
973+ command . response_representation = Google ::Apis ::BigqueryreservationV1 ::Policy ::Representation
974+ command . response_class = Google ::Apis ::BigqueryreservationV1 ::Policy
975+ command . params [ 'resource' ] = resource unless resource . nil?
976+ command . query [ 'options.requestedPolicyVersion' ] = options_requested_policy_version unless options_requested_policy_version . nil?
977+ command . query [ 'fields' ] = fields unless fields . nil?
978+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
979+ execute_or_queue_command ( command , &block )
980+ end
981+
933982 # Lists assignments. Only explicitly created assignments will be returned.
934983 # Example: * Organization `organizationA` contains two projects, `project1` and `
935984 # project2`. * Reservation `res1` exists and was created previously. *
@@ -1050,6 +1099,81 @@ def patch_project_location_reservation_assignment(name, assignment_object = nil,
10501099 command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
10511100 execute_or_queue_command ( command , &block )
10521101 end
1102+
1103+ # Sets an access control policy for a resource. Replaces any existing policy.
1104+ # Supported resources are: - Reservations To call this method, you must have the
1105+ # following Google IAM permissions: - `bigqueryreservation.reservations.
1106+ # setIamPolicy` to set policies on reservations.
1107+ # @param [String] resource
1108+ # REQUIRED: The resource for which the policy is being specified. See [Resource
1109+ # names](https://cloud.google.com/apis/design/resource_names) for the
1110+ # appropriate value for this field.
1111+ # @param [Google::Apis::BigqueryreservationV1::SetIamPolicyRequest] set_iam_policy_request_object
1112+ # @param [String] fields
1113+ # Selector specifying which fields to include in a partial response.
1114+ # @param [String] quota_user
1115+ # Available to use for quota purposes for server-side applications. Can be any
1116+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1117+ # @param [Google::Apis::RequestOptions] options
1118+ # Request-specific options
1119+ #
1120+ # @yield [result, err] Result & error if block supplied
1121+ # @yieldparam result [Google::Apis::BigqueryreservationV1::Policy] parsed result object
1122+ # @yieldparam err [StandardError] error object if request failed
1123+ #
1124+ # @return [Google::Apis::BigqueryreservationV1::Policy]
1125+ #
1126+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1127+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1128+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1129+ def set_assignment_iam_policy ( resource , set_iam_policy_request_object = nil , fields : nil , quota_user : nil , options : nil , &block )
1130+ command = make_simple_command ( :post , 'v1/{+resource}:setIamPolicy' , options )
1131+ command . request_representation = Google ::Apis ::BigqueryreservationV1 ::SetIamPolicyRequest ::Representation
1132+ command . request_object = set_iam_policy_request_object
1133+ command . response_representation = Google ::Apis ::BigqueryreservationV1 ::Policy ::Representation
1134+ command . response_class = Google ::Apis ::BigqueryreservationV1 ::Policy
1135+ command . params [ 'resource' ] = resource unless resource . nil?
1136+ command . query [ 'fields' ] = fields unless fields . nil?
1137+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
1138+ execute_or_queue_command ( command , &block )
1139+ end
1140+
1141+ # Gets your permissions on a resource. Returns an empty set of permissions if
1142+ # the resource doesn't exist. Supported resources are: - Reservations No Google
1143+ # IAM permissions are required to call this method.
1144+ # @param [String] resource
1145+ # REQUIRED: The resource for which the policy detail is being requested. See [
1146+ # Resource names](https://cloud.google.com/apis/design/resource_names) for the
1147+ # appropriate value for this field.
1148+ # @param [Google::Apis::BigqueryreservationV1::TestIamPermissionsRequest] test_iam_permissions_request_object
1149+ # @param [String] fields
1150+ # Selector specifying which fields to include in a partial response.
1151+ # @param [String] quota_user
1152+ # Available to use for quota purposes for server-side applications. Can be any
1153+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1154+ # @param [Google::Apis::RequestOptions] options
1155+ # Request-specific options
1156+ #
1157+ # @yield [result, err] Result & error if block supplied
1158+ # @yieldparam result [Google::Apis::BigqueryreservationV1::TestIamPermissionsResponse] parsed result object
1159+ # @yieldparam err [StandardError] error object if request failed
1160+ #
1161+ # @return [Google::Apis::BigqueryreservationV1::TestIamPermissionsResponse]
1162+ #
1163+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1164+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1165+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1166+ def test_assignment_iam_permissions ( resource , test_iam_permissions_request_object = nil , fields : nil , quota_user : nil , options : nil , &block )
1167+ command = make_simple_command ( :post , 'v1/{+resource}:testIamPermissions' , options )
1168+ command . request_representation = Google ::Apis ::BigqueryreservationV1 ::TestIamPermissionsRequest ::Representation
1169+ command . request_object = test_iam_permissions_request_object
1170+ command . response_representation = Google ::Apis ::BigqueryreservationV1 ::TestIamPermissionsResponse ::Representation
1171+ command . response_class = Google ::Apis ::BigqueryreservationV1 ::TestIamPermissionsResponse
1172+ command . params [ 'resource' ] = resource unless resource . nil?
1173+ command . query [ 'fields' ] = fields unless fields . nil?
1174+ command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
1175+ execute_or_queue_command ( command , &block )
1176+ end
10531177
10541178 protected
10551179
0 commit comments