示例#1
0
        internal DescribeStackResourceResponse DescribeStackResource(DescribeStackResourceRequest request)
        {
            var marshaller   = new DescribeStackResourceRequestMarshaller();
            var unmarshaller = DescribeStackResourceResponseUnmarshaller.Instance;

            return(Invoke <DescribeStackResourceRequest, DescribeStackResourceResponse>(request, marshaller, unmarshaller));
        }
示例#2
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeStackResource operation.
        /// <seealso cref="Amazon.CloudFormation.IAmazonCloudFormation.DescribeStackResource"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeStackResource operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <DescribeStackResourceResponse> DescribeStackResourceAsync(DescribeStackResourceRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DescribeStackResourceRequestMarshaller();
            var unmarshaller = DescribeStackResourceResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, DescribeStackResourceRequest, DescribeStackResourceResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
        /// <summary>
        /// <para> Returns the description for the specified resource in the specified stack. </para> <para>For deleted stacks, DescribeStackResource
        /// returns resource information for up to 90 days after the stack has been deleted. </para> <para> You must specify <c>StackName</c> and
        /// <c>LogicalResourceId</c> .
        /// </para>
        /// </summary>
        ///
        /// <param name="describeStackResourceRequest">Container for the necessary parameters to execute the DescribeStackResource service method on
        ///           AmazonCloudFormation.</param>
        ///
        /// <returns>The response from the DescribeStackResource service method, as returned by AmazonCloudFormation.</returns>
        ///
        public DescribeStackResourceResponse DescribeStackResource(DescribeStackResourceRequest describeStackResourceRequest)
        {
            IRequest <DescribeStackResourceRequest> request  = new DescribeStackResourceRequestMarshaller().Marshall(describeStackResourceRequest);
            DescribeStackResourceResponse           response = Invoke <DescribeStackResourceRequest, DescribeStackResourceResponse> (request, this.signer, DescribeStackResourceResponseUnmarshaller.GetInstance());

            return(response);
        }
示例#4
0
        /// <summary>
        /// Initiates the asynchronous execution of the DescribeStackResource operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeStackResource operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <DescribeStackResourceResponse> DescribeStackResourceAsync(DescribeStackResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new DescribeStackResourceRequestMarshaller();
            var unmarshaller = DescribeStackResourceResponseUnmarshaller.Instance;

            return(InvokeAsync <DescribeStackResourceRequest, DescribeStackResourceResponse>(request, marshaller,
                                                                                             unmarshaller, cancellationToken));
        }
        private string ResolvePhysicalId(string logicalId)
        {
            var req = new DescribeStackResourceRequest()
            {
                StackName = _stackName, LogicalResourceId = logicalId
            };
            var result = _cloudFormationClient.DescribeStackResourceAsync(req).Result;

            return(result.StackResourceDetail.PhysicalResourceId);
        }
        public async Task <string> GetResourceId(string stackName, string logicalId)
        {
            var request = new DescribeStackResourceRequest
            {
                StackName         = stackName,
                LogicalResourceId = logicalId
            };

            var response = await _cloudFormationClient.DescribeStackResourceAsync(request);

            return(response.StackResourceDetail.PhysicalResourceId);
        }
示例#7
0
        /// <summary>
        /// <para>Returns a description of the specified resource in the specified stack.</para> <para>For deleted stacks, DescribeStackResource returns
        /// resource information for up to 90 days after the stack has been deleted.</para>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the DescribeStackResource service method on
        /// AmazonCloudFormation.</param>
        ///
        /// <returns>The response from the DescribeStackResource service method, as returned by AmazonCloudFormation.</returns>
        public DescribeStackResourceResponse DescribeStackResource(DescribeStackResourceRequest request)
        {
            var task = DescribeStackResourceAsync(request);

            try
            {
                return(task.Result);
            }
            catch (AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return(null);
            }
        }