public async Task DeleteAsync()

in src/Azure.Deployments.Extensibility.Providers.Kubernetes/Models/KubernetesResource.cs [85:103]


        public async Task<JsonElement> DeleteAsync(CancellationToken cancellationToken)
        {
            var result = this.Namespace is not null
                ? await this.Kubernetes.CustomObjects.DeleteNamespacedCustomObjectAsync(
                    this.Group,
                    this.Version,
                    this.Namespace,
                    this.Plural,
                    this.Properties.Metadata.Name,
                    cancellationToken: cancellationToken)
                : await this.Kubernetes.CustomObjects.DeleteClusterCustomObjectAsync(
                    this.Group,
                    this.Version,
                    this.Plural,
                    this.Properties.Metadata.Name,
                    cancellationToken: cancellationToken);

            return ExtensibilityJsonSerializer.Default.SerializeToElement(result);
        }