Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public async applyRecommendation(
resourceName: string | string[],
options?: ServiceCreateOptions
): Promise {
const request = new ApplyRecommendationRequest()
request.setCustomerId(this.cid)
if (resourceName instanceof Array) {
const operations = resourceName.map(name => {
const operation = new ApplyRecommendationOperation()
operation.setResourceName(name)
return operation
})
request.setOperationsList(operations)
} else {
const operation = new ApplyRecommendationOperation()
operation.setResourceName(resourceName)
request.setOperationsList([operation])
}
if (options && options.hasOwnProperty('partial_failure')) {