/// <summary>Snippet for CreateServiceLevelObjectiveAsync</summary> public async Task CreateServiceLevelObjectiveAsync() { // Snippet: CreateServiceLevelObjectiveAsync(ServiceName,ServiceLevelObjective,CallSettings) // Additional: CreateServiceLevelObjectiveAsync(ServiceName,ServiceLevelObjective,CancellationToken) // Create client ServiceMonitoringServiceClient serviceMonitoringServiceClient = await ServiceMonitoringServiceClient.CreateAsync(); // Initialize request argument(s) ServiceName parent = new ServiceName("[PROJECT]", "[SERVICE]"); ServiceLevelObjective serviceLevelObjective = new ServiceLevelObjective(); // Make the request ServiceLevelObjective response = await serviceMonitoringServiceClient.CreateServiceLevelObjectiveAsync(parent, serviceLevelObjective); // End snippet }
/// <summary>Snippet for CreateServiceLevelObjectiveAsync</summary> public async Task CreateServiceLevelObjectiveAsync_RequestObject() { // Snippet: CreateServiceLevelObjectiveAsync(CreateServiceLevelObjectiveRequest,CallSettings) // Additional: CreateServiceLevelObjectiveAsync(CreateServiceLevelObjectiveRequest,CancellationToken) // Create client ServiceMonitoringServiceClient serviceMonitoringServiceClient = await ServiceMonitoringServiceClient.CreateAsync(); // Initialize request argument(s) CreateServiceLevelObjectiveRequest request = new CreateServiceLevelObjectiveRequest { ParentAsServiceName = new ServiceName("[PROJECT]", "[SERVICE]"), ServiceLevelObjective = new ServiceLevelObjective(), }; // Make the request ServiceLevelObjective response = await serviceMonitoringServiceClient.CreateServiceLevelObjectiveAsync(request); // End snippet }