Skip to content

Commit

Permalink
feat: added AccessPolicy.scopes, EgressTo.external_resources, and IAM…
Browse files Browse the repository at this point in the history
… methods

PiperOrigin-RevId: 487011241

Source-Link: googleapis/googleapis@f31ec7d

Source-Link: googleapis/googleapis-gen@ede3360
Copy-Tag: eyJwIjoiYXBpcy9Hb29nbGUuSWRlbnRpdHkuQWNjZXNzQ29udGV4dE1hbmFnZXIuVjEvLk93bEJvdC55YW1sIiwiaCI6ImVkZTMzNjBjOWZjMGU4NzYyZTU2YTQyOGQwZTc2ZTU0NmVmYWNjYzkifQ==
  • Loading branch information
gcf-owl-bot[bot] authored and jskeet committed Nov 9, 2022
1 parent 3885e56 commit a4ebef3
Show file tree
Hide file tree
Showing 16 changed files with 3,370 additions and 2,079 deletions.
Expand Up @@ -45,6 +45,7 @@ public async Task CreateAccessPolicyRequestObjectAsync()
CreateTime = new Timestamp(),
UpdateTime = new Timestamp(),
Etag = "",
Scopes = { "", },
};
// Make the request
Operation<AccessPolicy, AccessContextManagerOperationMetadata> response = await accessContextManagerClient.CreateAccessPolicyAsync(request);
Expand Down
Expand Up @@ -44,6 +44,7 @@ public void CreateAccessPolicyRequestObject()
CreateTime = new Timestamp(),
UpdateTime = new Timestamp(),
Etag = "",
Scopes = { "", },
};
// Make the request
Operation<AccessPolicy, AccessContextManagerOperationMetadata> response = accessContextManagerClient.CreateAccessPolicy(request);
Expand Down
@@ -0,0 +1,50 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_async]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for GetIamPolicyAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task GetIamPolicyRequestObjectAsync()
{
// Create client
AccessContextManagerClient accessContextManagerClient = await AccessContextManagerClient.CreateAsync();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = await accessContextManagerClient.GetIamPolicyAsync(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_async]
}
@@ -0,0 +1,49 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for GetIamPolicy</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void GetIamPolicyRequestObject()
{
// Create client
AccessContextManagerClient accessContextManagerClient = AccessContextManagerClient.Create();
// Initialize request argument(s)
GetIamPolicyRequest request = new GetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Options = new GetPolicyOptions(),
};
// Make the request
Policy response = accessContextManagerClient.GetIamPolicy(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_GetIamPolicy_sync]
}
@@ -0,0 +1,52 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_async]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;
using Google.Protobuf.WellKnownTypes;
using System.Threading.Tasks;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for SetIamPolicyAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task SetIamPolicyRequestObjectAsync()
{
// Create client
AccessContextManagerClient accessContextManagerClient = await AccessContextManagerClient.CreateAsync();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = await accessContextManagerClient.SetIamPolicyAsync(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_async]
}
@@ -0,0 +1,51 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;
using Google.Protobuf.WellKnownTypes;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for SetIamPolicy</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void SetIamPolicyRequestObject()
{
// Create client
AccessContextManagerClient accessContextManagerClient = AccessContextManagerClient.Create();
// Initialize request argument(s)
SetIamPolicyRequest request = new SetIamPolicyRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Policy = new Policy(),
UpdateMask = new FieldMask(),
};
// Make the request
Policy response = accessContextManagerClient.SetIamPolicy(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_SetIamPolicy_sync]
}
@@ -0,0 +1,50 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_async]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;
using System.Threading.Tasks;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for TestIamPermissionsAsync</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public async Task TestIamPermissionsRequestObjectAsync()
{
// Create client
AccessContextManagerClient accessContextManagerClient = await AccessContextManagerClient.CreateAsync();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = await accessContextManagerClient.TestIamPermissionsAsync(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_async]
}
@@ -0,0 +1,49 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

// Generated code. DO NOT EDIT!

namespace Google.Identity.AccessContextManager.V1.Snippets
{
// [START accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync]
using Google.Api.Gax;
using Google.Cloud.Iam.V1;
using Google.Identity.AccessContextManager.V1;

public sealed partial class GeneratedAccessContextManagerClientSnippets
{
/// <summary>Snippet for TestIamPermissions</summary>
/// <remarks>
/// This snippet has been automatically generated and should be regarded as a code template only.
/// It will require modifications to work:
/// - It may require correct/in-range values for request initialization.
/// - It may require specifying regional endpoints when creating the service client as shown in
/// https://cloud.google.com/dotnet/docs/reference/help/client-configuration#endpoint.
/// </remarks>
public void TestIamPermissionsRequestObject()
{
// Create client
AccessContextManagerClient accessContextManagerClient = AccessContextManagerClient.Create();
// Initialize request argument(s)
TestIamPermissionsRequest request = new TestIamPermissionsRequest
{
ResourceAsResourceName = new UnparsedResourceName("a/wildcard/resource"),
Permissions = { "", },
};
// Make the request
TestIamPermissionsResponse response = accessContextManagerClient.TestIamPermissions(request);
}
}
// [END accesscontextmanager_v1_generated_AccessContextManager_TestIamPermissions_sync]
}

0 comments on commit a4ebef3

Please sign in to comment.