/** * Creates a new exclusion in a specified parent resource. Only log entries belonging to that * resource can be excluded. You can have up to 10 exclusions in a resource. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ParentName parent = ProjectName.of("[PROJECT]"); * LogExclusion exclusion = LogExclusion.newBuilder().build(); * LogExclusion response = configClient.createExclusion(parent, exclusion); * } * </code></pre> * * @param parent Required. The parent resource in which to create the exclusion: * <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" * <p>Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(ParentName parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setExclusion(exclusion) .build(); return createExclusion(request); }
/** * Creates a new exclusion in a specified parent resource. Only log entries belonging to that * resource can be excluded. You can have up to 10 exclusions in a resource. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ParentName parent = ProjectName.of("[PROJECT]"); * LogExclusion exclusion = LogExclusion.newBuilder().build(); * LogExclusion response = configClient.createExclusion(parent, exclusion); * } * </code></pre> * * @param parent Required. The parent resource in which to create the exclusion: * <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" * <p>Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(ParentName parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .setExclusion(exclusion) .build(); return createExclusion(request); }
/** * Creates a new exclusion in a specified parent resource. Only log entries belonging to that * resource can be excluded. You can have up to 10 exclusions in a resource. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ParentName parent = ProjectName.of("[PROJECT]"); * LogExclusion exclusion = LogExclusion.newBuilder().build(); * LogExclusion response = configClient.createExclusion(parent.toString(), exclusion); * } * </code></pre> * * @param parent Required. The parent resource in which to create the exclusion: * <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" * <p>Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder().setParent(parent).setExclusion(exclusion).build(); return createExclusion(request); }
/** * Creates a new exclusion in a specified parent resource. Only log entries belonging to that * resource can be excluded. You can have up to 10 exclusions in a resource. * * <p>Sample code: * * <pre><code> * try (ConfigClient configClient = ConfigClient.create()) { * ParentName parent = ProjectName.of("[PROJECT]"); * LogExclusion exclusion = LogExclusion.newBuilder().build(); * LogExclusion response = configClient.createExclusion(parent.toString(), exclusion); * } * </code></pre> * * @param parent Required. The parent resource in which to create the exclusion: * <p>"projects/[PROJECT_ID]" "organizations/[ORGANIZATION_ID]" * "billingAccounts/[BILLING_ACCOUNT_ID]" "folders/[FOLDER_ID]" * <p>Examples: `"projects/my-logging-project"`, `"organizations/123456789"`. * @param exclusion Required. The new exclusion, whose `name` parameter is an exclusion name that * is not already used in the parent resource. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final LogExclusion createExclusion(String parent, LogExclusion exclusion) { CreateExclusionRequest request = CreateExclusionRequest.newBuilder().setParent(parent).setExclusion(exclusion).build(); return createExclusion(request); }