@pulumi/awsx
Version:
[](https://github.com/pulumi/pulumi-awsx/actions) [](https://slack.pulumi.com) [;
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://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.
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.metrics = void 0;
const cloudwatch = __importStar(require("../cloudwatch"));
var metrics;
(function (metrics) {
/**
* Creates an AWS/ACMPrivateCA metric with the requested [metricName]. See
* https://docs.aws.amazon.com/acm-pca/latest/userguide/PcaCloudWatch.html for list of all
* metric-names.
*
* Note, individual metrics can easily be obtained without supplying the name using the other
* [metricXXX] functions.
*/
function metric(metricName, change = {}) {
return new cloudwatch.Metric({
namespace: "AWS/ACMPrivateCA",
name: metricName,
...change,
});
}
/**
* A certificate revocation list (CRL) was generated. This metric applies only to a private CA.
*/
function crlGenerated(change) {
return metric("CRLGenerated", change);
}
metrics.crlGenerated = crlGenerated;
/**
* The S3 bucket specified for the CRL is not correctly configured. Check the bucket policy. This
* metric applies only to a private CA.
*/
function misconfiguredCRLBucket(change) {
return metric("MisconfiguredCRLBucket", change);
}
metrics.misconfiguredCRLBucket = misconfiguredCRLBucket;
/**
* The time at which the certificate was issued. This metric applies only to the
* [IssueCertificate](https://docs.aws.amazon.com/acm-pca/latest/APIReference/API_IssueCertificate.html)
* operation.
*/
function time(change) {
return metric("Time", change);
}
metrics.time = time;
/**
* Specifies whether a certificate was successfully issued. This metric applies only to the
* IssueCertificate operation.
*/
function success(change) {
return metric("Success", change);
}
metrics.success = success;
/**
* Indicates that an operation failed. This metric applies only to the IssueCertificate operation.
*/
function failure(change) {
return metric("Failure", change);
}
metrics.failure = failure;
})(metrics || (exports.metrics = metrics = {}));
//# sourceMappingURL=metrics.js.map