-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(aws): update spec #2509
base: master
Are you sure you want to change the base?
feat(aws): update spec #2509
Conversation
Overviewsrc/aws/application-signals.ts:Info:src/aws/geo-maps.ts:Info:src/aws/internetmonitor.ts:Info:src/aws/geo-places.ts:Info:src/aws/license-manager-user-subscriptions.ts:Info:src/aws/b2bi.ts:Info:src/aws/mwaa.ts:Info:src/aws/efs.ts:Info:src/aws/geo-routes.ts:Info:src/aws/keyspaces.ts:Info:src/aws/taxsettings.ts:Info:URLs:
src/aws/accessanalyzer.ts:Info:src/aws/connectcampaignsv2.ts:Info:src/aws/partnercentral-selling.ts:Info:src/aws/customer-profiles.ts:Info:src/aws/ivs.ts:Info:URLs:
src/aws/datasync.ts:Info:src/aws/cloudtrail.ts:Info:src/aws/billing.ts:Info:URLs:
src/aws/sts.ts:Info:src/aws/autoscaling.ts:Info:URLs:
src/aws/cloudwatch.ts:Info:Single Functions:custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-metrics",
["--namespace"],
"Metrics",
"MetricName"
);
} custom: async function (tokens, executeShellCommand) {
return listDimensionTypes(
tokens,
executeShellCommand,
"list-metrics",
"--namespace",
"Metrics",
"Dimensions"
);
} custom: async function (tokens, executeShellCommand) {
return listDimensionTypes(
tokens,
executeShellCommand,
"describe-anomaly-detectors",
"--namespace",
"AnomalyDetectors",
"Dimensions"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"describe-anomaly-detectors",
["--namespace", "--metric-name"],
"AnomalyDetectors",
"Stat"
);
} custom: async function (tokens, executeShellCommand) {
// get list of stream names
const result = await getResultList(
tokens,
executeShellCommand,
["firehose", "list-delivery-streams"],
"DeliveryStreamNames"
);
// construct "query"
const objects = result.flat().map((stream) => {
return {
command: [
"firehose",
"describe-delivery-stream",
"--delivery-stream-name",
Array.isArray(stream.name) ? stream.name[0] : stream.name,
],
parentKey: "DeliveryStreamDescription",
childKey: "DeliveryStreamARN",
};
});
// Fire up multiple API calls
return MultiSuggestionsGenerator(tokens, executeShellCommand, [
...objects,
]);
} src/aws/iotwireless.ts:Info:src/aws/qconnect.ts:Info:URLs:
src/aws/route53resolver.ts:Info:src/aws/organizations.ts:Info:URLs:
src/aws/pinpoint-sms-voice-v2.ts:Info:src/aws/dynamodb.ts:Info:src/aws/iotsitewise.ts:Info:src/aws/workspaces.ts:Info:src/aws/ecs.ts:Info:URLs:
src/aws/cloudformation.ts:Info:Single Functions:postProcess: function (out) {
try {
const accountId = JSON.parse(out)["Account"];
return [{ name: accountId }];
} catch (error) {
console.error(error);
}
return [];
} postProcess: function (out) {
return postPrecessGenerator(out, "TypeSummaries", "TypeArn");
} postProcess: function (out) {
return postPrecessGenerator(out, "Exports", "Name");
} postProcess: function (out, tokens) {
try {
return out.split("\n").map((line) => {
const parts = line.split(/\s+/);
// sub prefix
if (!parts.length) {
return [];
}
return {
name: _prefixS3 + parts[parts.length - 1],
};
}) as Fig.Suggestion[];
} catch (error) {
console.error(error);
}
return [];
} postProcess: function (out) {
return postPrecessGenerator(out, "Keys", "KeyId");
} src/aws/glue.ts:Info:src/aws/quicksight.ts:Info:URLs:
src/aws.ts:Info:Single Functions:postProcess: function (out) {
if (out.trim() == "") {
return [];
}
return out.split("\n").map((line) => ({
name: line,
icon: "👤",
}));
} URLs:
src/aws/iot.ts:Info:URLs:
src/aws/iam.ts:Info:Single Functions:postProcess: function (out, tokens) {
try {
const accountId = JSON.parse(out)["Account"];
return [{ name: `arn:aws:iam::${accountId}-ID:root` }];
} catch (error) {
console.error(error);
}
return [];
} postProcess: function (out) {
return postPrecessGenerator(out, "OpenIDConnectProviderList", "Arn");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"get-open-id-connect-provider",
"--open-id-connect-provider-arn",
"ClientIDList"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"get-open-id-connect-provider",
"--open-id-connect-provider-arn",
"ThumbprintList"
);
} postProcess: function (out) {
return postPrecessGenerator(
out,
"InstanceProfiles",
"InstanceProfileName"
);
} custom: async function (tokens, executeShellCommand) {
try {
const idx = tokens.indexOf("--instance-profile-name");
if (idx < 0) {
return [];
}
const param = tokens[idx + 1];
const { stdout } = await executeShellCommand({
command: "aws",
args: [
"iam",
"get-instance-profile",
"--instance-profile-name",
param,
],
});
const policies = JSON.parse(stdout)["InstanceProfile"];
return policies["Roles"].map((elm) => {
return {
name: elm["RoleName"],
};
});
} catch (e) {
console.log(e);
}
return [];
} postProcess: function (out) {
return postPrecessGenerator(out, "Users", "UserName");
} postProcess: function (out) {
return postPrecessGenerator(out, "Users", "Arn");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-user-policies",
"--user-name",
"PolicyNames"
);
} postProcess: function (out) {
return postPrecessGenerator(out, "Groups", "GroupName");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"get-group",
"--group-name",
"Users",
"UserName"
);
} postProcess: function (out) {
return postPrecessGenerator(out, "Policies", "Arn");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-policy-versions",
"--policy-arn",
"Versions",
"VersionId"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-group-policies",
"--group-name",
"PolicyNames"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-attached-group-policies",
"--group-name",
"AttachedPolicies",
"PolicyArn"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-attached-group-policies",
"--group-name",
"AttachedPolicies",
"PolicyName"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-attached-role-policies",
"--role-name",
"AttachedPolicies",
"PolicyArn"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-attached-user-policies",
"--user-name",
"AttachedPolicies",
"PolicyArn"
);
} postProcess: function (out) {
return postPrecessGenerator(out, "Roles", "RoleName");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-role-policies",
"--role-name",
"PolicyNames"
);
} postProcess: function (out) {
return postPrecessGenerator(out, "MFADevices", "SerialNumber");
} postProcess: function (out) {
return postPrecessGenerator(out, "VirtualMFADevices", "SerialNumber");
} postProcess: function (out) {
return postPrecessGenerator(out, "AccessKeyMetadata", "AccessKeyId");
} postProcess: function (out) {
return postPrecessGenerator(out, "AccountAliases");
} postProcess: function (out) {
return postPrecessGenerator(out, "SAMLProviderList", "Arn");
} postProcess: function (out) {
return postPrecessGenerator(out, "SSHPublicKeys", "SSHPublicKeyId");
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-ssh-public-keys",
"--user-name",
"SSHPublicKeys",
"SSHPublicKeyId"
);
} postProcess: function (out) {
return postPrecessGenerator(
out,
"ServerCertificateMetadataList",
"ServerCertificateName"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-service-specific-credentials",
"--user-name",
"ServiceSpecificCredentials",
"ServiceSpecificCredentialId"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-signing-certificates",
"--user-name",
"Certificates",
"CertificateId"
);
} custom: async function (tokens, executeShellCommand) {
return MultiSuggestionsGenerator(tokens, executeShellCommand, [
...identityStruct,
{
command: ["iam", "list-policies", "--scope", "Local"],
parentKey: "Policies",
childKey: "Arn",
},
]);
} custom: async function (tokens, executeShellCommand) {
return MultiSuggestionsGenerator(
tokens,
executeShellCommand,
identityStruct
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-instance-profile-tags",
"--instance-profile-name",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-mfa-device-tags",
"--serial-number",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-open-id-connect-provider-tags",
"--open-id-connect-provider-arn",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-policy-tags",
"--policy-arn",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-role-tags",
"--role-name",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-saml-provider-tags",
"--saml-provider-arn",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-server-certificate-tags",
"--server-certificate-name",
"Tags",
"Key"
);
} custom: async function (tokens, executeShellCommand) {
return listCustomGenerator(
tokens,
executeShellCommand,
"list-user-tags",
"--user-name",
"Tags",
"Key"
);
} URLs:
src/aws/connect.ts:Info:src/aws/s3api.ts:Info:Single Functions:postProcess: function (out) {
const json = JSON.parse(out);
return json.Buckets.map((bucket) => {
let date;
try {
date = new Date(bucket.CreationDate).toLocaleDateString();
} catch (e) {
date = bucket.CreationDate;
}
return {
name: bucket.Name,
description: `Created: ${date}`,
};
});
} URLs:
src/aws/rds.ts:Info:src/aws/appconfig.ts:Info: |
Hello @withfig-bot,
Please add a 👍 as a reaction to this comment to show that you read this. |
Automated PR for latest AWS CLI release by https://github.com/withfig/aws-cli-plugin