with Azure Storage and RabbitMQ?
Emit new event when a blob is deleted from a specified container in Azure Storage. See the documentation
Emit new event when a new blob is created to a specified container in Azure Storage. See the documentation
Emit new event when a new container is created in the specified Azure Storage account. See the documentation
Creates a new container under the specified account. If a container with the same name already exists, the operation fails. See the documentation
Deletes a specific blob from a container in Azure Storage. See the documentation
Uploads a new blob to a specified container in Azure Storage. See the documentation
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
azure_storage: {
type: "app",
app: "azure_storage",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://graph.microsoft.com/v1.0/me`,
headers: {
Authorization: `Bearer ${this.azure_storage.$auth.oauth_access_token}`,
},
})
},
})
import amqp from "amqplib";
export default defineComponent({
props: {
rabbitmq: {
type: "app",
app: "rabbitmq",
}
},
async run({ steps, $ }) {
const url = `amqp://${this.rabbitmq.$auth.username}:${this.rabbitmq.$auth.password}@${this.rabbitmq.$auth.host}:${this.rabbitmq.$auth.port}`;
const connection = await amqp.connect(url);
const channel = await connection.createChannel();
const queue = 'Sample Queue';
await channel.assertQueue(queue, { durable: true });
const message = 'Welcome RabbitMQ + Pipedream users! ' + new Date().toISOString()
channel.sendToQueue(queue, Buffer.from(message), { persistent: true });
console.log(`Sent: ${message}`);
const queueInfo = await channel.checkQueue(queue);
return queueInfo;
},
})